summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-06-10 03:57:30 +0000
committer Steven Moreland <smoreland@google.com> 2021-06-12 00:22:10 +0000
commit19fc9f7991f27fd75b6a1d872e91d7377b89401d (patch)
tree274a75aa90b14c08e3a04031c979d947122ba4ca /libs/binder/RpcState.cpp
parentc7d40135ed5fb30434c95f3058324b0af6916711 (diff)
libbinder: RPC disambiguate server/client
Now: - server: RpcServer - client: a client of an RpcServer - incoming: a thread processing commands (either as part of an RpcServer's sessions or back to a client which has a threadpool) - outgoing: a thread for sending commands (either to an RpcServer's sessions or back to a client which has a threadpool) Bug: 167966510 Test: binderRpcTest Change-Id: Iea286ab0ff6f9fb775994247003b8d29c999e10a
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r--libs/binder/RpcState.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 050f4fbeb3..8dd6dafd60 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -272,7 +272,7 @@ status_t RpcState::rpcRec(const sp<RpcSession::RpcConnection>& connection,
status_t RpcState::sendConnectionInit(const sp<RpcSession::RpcConnection>& connection,
const sp<RpcSession>& session) {
- RpcClientConnectionInit init{
+ RpcOutgoingConnectionInit init{
.msg = RPC_CONNECTION_INIT_OKAY,
};
return rpcSend(connection, session, "connection init", &init, sizeof(init));
@@ -280,7 +280,7 @@ status_t RpcState::sendConnectionInit(const sp<RpcSession::RpcConnection>& conne
status_t RpcState::readConnectionInit(const sp<RpcSession::RpcConnection>& connection,
const sp<RpcSession>& session) {
- RpcClientConnectionInit init;
+ RpcOutgoingConnectionInit init;
if (status_t status = rpcRec(connection, session, "connection init", &init, sizeof(init));
status != OK)
return status;
@@ -470,7 +470,7 @@ status_t RpcState::waitForReply(const sp<RpcSession::RpcConnection>& connection,
if (command.command == RPC_COMMAND_REPLY) break;
- if (status_t status = processServerCommand(connection, session, command, CommandType::ANY);
+ if (status_t status = processCommand(connection, session, command, CommandType::ANY);
status != OK)
return status;
}
@@ -539,7 +539,7 @@ status_t RpcState::getAndExecuteCommand(const sp<RpcSession::RpcConnection>& con
status != OK)
return status;
- return processServerCommand(connection, session, command, type);
+ return processCommand(connection, session, command, type);
}
status_t RpcState::drainCommands(const sp<RpcSession::RpcConnection>& connection,
@@ -553,9 +553,9 @@ status_t RpcState::drainCommands(const sp<RpcSession::RpcConnection>& connection
return OK;
}
-status_t RpcState::processServerCommand(const sp<RpcSession::RpcConnection>& connection,
- const sp<RpcSession>& session, const RpcWireHeader& command,
- CommandType type) {
+status_t RpcState::processCommand(const sp<RpcSession::RpcConnection>& connection,
+ const sp<RpcSession>& session, const RpcWireHeader& command,
+ CommandType type) {
IPCThreadState* kernelBinderState = IPCThreadState::selfOrNull();
IPCThreadState::SpGuard spGuard{
.address = __builtin_frame_address(0),