diff options
| author | 2023-11-03 17:35:07 +0000 | |
|---|---|---|
| committer | 2023-11-03 17:35:07 +0000 | |
| commit | 13b83f02ffc64a6c2a4ce44fb5bfb6d45b685f16 (patch) | |
| tree | 7827119309cf7ab3cbe1fb4b352c28e3b8587ec3 /libs/binder/RpcState.cpp | |
| parent | 23a5896ef2c1a0b26ce492c2ef0d8df238301e6f (diff) | |
| parent | 6da313b7f2269fc2a84d7c202d7947312bfd9bd6 (diff) | |
Merge "Binder: migrate off libbase macros" into main am: 6da313b7f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2816281
Change-Id: Iebcd0e7fac2b5ccb0d5ce4fe23c020824e7db6ad
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()); } |