diff options
author | 2023-10-06 20:28:49 +0000 | |
---|---|---|
committer | 2023-10-16 18:38:10 +0000 | |
commit | 0d9dec207e5c9b208ff841a4f73a91046c92ed25 (patch) | |
tree | 16e0c9a48c02e39d91ea6c1d34031b696e692339 /libs/binder/RpcSession.cpp | |
parent | 74a858c03904bb7bd096bf9f2dc330e6bae8c814 (diff) |
Binder: Split OS to Android and Unix part, abstract GetThreadId out
Bug: 302723053
Test: mma in binder folder
Test: aosp/2616196
Change-Id: I73df8fc453df0edf496960853cb0004f1c3a6a43
Diffstat (limited to 'libs/binder/RpcSession.cpp')
-rw-r--r-- | libs/binder/RpcSession.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp index c3dee1650e..679b194426 100644 --- a/libs/binder/RpcSession.cpp +++ b/libs/binder/RpcSession.cpp @@ -70,7 +70,7 @@ RpcSession::~RpcSession() { sp<RpcSession> RpcSession::make() { // Default is without TLS. - return make(makeDefaultRpcTransportCtxFactory()); + return make(binder::os::makeDefaultRpcTransportCtxFactory()); } sp<RpcSession> RpcSession::make(std::unique_ptr<RpcTransportCtxFactory> rpcTransportCtxFactory) { @@ -195,7 +195,7 @@ status_t RpcSession::setupPreconnectedClient(base::unique_fd fd, fd = request(); if (!fd.ok()) return BAD_VALUE; } - if (auto res = setNonBlocking(fd); !res.ok()) { + if (auto res = binder::os::setNonBlocking(fd); !res.ok()) { ALOGE("setupPreconnectedClient: %s", res.error().message().c_str()); return res.error().code() == 0 ? UNKNOWN_ERROR : -res.error().code(); } @@ -770,7 +770,7 @@ status_t RpcSession::addOutgoingConnection(std::unique_ptr<RpcTransport> rpcTran { RpcMutexLockGuard _l(mMutex); connection->rpcTransport = std::move(rpcTransport); - connection->exclusiveTid = rpcGetThreadId(); + connection->exclusiveTid = binder::os::GetThreadId(); mConnections.mOutgoing.push_back(connection); } @@ -825,7 +825,7 @@ sp<RpcSession::RpcConnection> RpcSession::assignIncomingConnectionToThisThread( sp<RpcConnection> session = sp<RpcConnection>::make(); session->rpcTransport = std::move(rpcTransport); - session->exclusiveTid = rpcGetThreadId(); + session->exclusiveTid = binder::os::GetThreadId(); mConnections.mIncoming.push_back(session); mConnections.mMaxIncoming = mConnections.mIncoming.size(); @@ -870,7 +870,7 @@ status_t RpcSession::ExclusiveConnection::find(const sp<RpcSession>& session, Co connection->mConnection = nullptr; connection->mReentrant = false; - uint64_t tid = rpcGetThreadId(); + uint64_t tid = binder::os::GetThreadId(); RpcMutexUniqueLock _l(session->mMutex); session->mConnections.mWaitingThreads++; |