diff options
| author | 2023-11-03 18:08:09 +0000 | |
|---|---|---|
| committer | 2023-11-03 18:08:09 +0000 | |
| commit | eaf5d4af5e8901b07f642b1e8d055380307c19db (patch) | |
| tree | 138ba926561f34c57dee67d1dbc30b581db50267 /libs/binder/RpcState.cpp | |
| parent | 2ba229b49ce9ef797f458d1118e80c5fcadd2365 (diff) | |
| parent | 13b83f02ffc64a6c2a4ce44fb5bfb6d45b685f16 (diff) | |
Merge "Binder: migrate off libbase macros" into main am: 6da313b7f2 am: 13b83f02ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2816281
Change-Id: I7757cc02db701842e415e65f97b21a9ee202b073
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/binder/RpcState.cpp')
| -rw-r--r-- | libs/binder/RpcState.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index 749c2f81ea..964a5c4ff9 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -18,7 +18,6 @@ #include "RpcState.h" -#include <android-base/macros.h> #include <android-base/scopeguard.h> #include <binder/BpBinder.h> #include <binder/IPCThreadState.h> @@ -601,7 +600,7 @@ status_t RpcState::transactAddress(const sp<RpcSession::RpcConnection>& connecti objectTableSpan.toIovec(), }; if (status_t status = rpcSend( - connection, session, "transaction", iovs, arraysize(iovs), + connection, session, "transaction", iovs, countof(iovs), [&] { if (waitUs > kWaitLogUs) { ALOGE("Cannot send command, trying to process pending refcounts. Waiting " @@ -690,7 +689,7 @@ status_t RpcState::waitForReply(const sp<RpcSession::RpcConnection>& connection, {&rpcReply, rpcReplyWireSize}, {data.data(), data.size()}, }; - if (status_t status = rpcRec(connection, session, "reply body", iovs, arraysize(iovs), nullptr); + if (status_t status = rpcRec(connection, session, "reply body", iovs, countof(iovs), nullptr); status != OK) return status; @@ -760,7 +759,7 @@ status_t RpcState::sendDecStrongToTarget(const sp<RpcSession::RpcConnection>& co .bodySize = sizeof(RpcDecStrong), }; iovec iovs[]{{&cmd, sizeof(cmd)}, {&body, sizeof(body)}}; - return rpcSend(connection, session, "dec ref", iovs, arraysize(iovs), std::nullopt); + return rpcSend(connection, session, "dec ref", iovs, countof(iovs), std::nullopt); } status_t RpcState::getAndExecuteCommand(const sp<RpcSession::RpcConnection>& connection, @@ -1143,7 +1142,7 @@ processTransactInternalTailCall: {const_cast<uint8_t*>(reply.data()), reply.dataSize()}, objectTableSpan.toIovec(), }; - return rpcSend(connection, session, "reply", iovs, arraysize(iovs), std::nullopt, + return rpcSend(connection, session, "reply", iovs, countof(iovs), std::nullopt, rpcFields->mFds.get()); } |