Lines Matching refs:mProcess
341 return mProcess; in process()
410 if (mProcess->mDriverFD <= 0) in flushCommands()
426 pthread_mutex_lock(&mProcess->mThreadCountLock); in blockUntilThreadAvailable()
427 while (mProcess->mExecutingThreadsCount >= mProcess->mMaxThreads) { in blockUntilThreadAvailable()
429 static_cast<unsigned long>(mProcess->mExecutingThreadsCount), in blockUntilThreadAvailable()
430 static_cast<unsigned long>(mProcess->mMaxThreads)); in blockUntilThreadAvailable()
431 pthread_cond_wait(&mProcess->mThreadCountDecrement, &mProcess->mThreadCountLock); in blockUntilThreadAvailable()
433 pthread_mutex_unlock(&mProcess->mThreadCountLock); in blockUntilThreadAvailable()
451 pthread_mutex_lock(&mProcess->mThreadCountLock); in getAndExecuteCommand()
452 mProcess->mExecutingThreadsCount++; in getAndExecuteCommand()
453 if (mProcess->mExecutingThreadsCount >= mProcess->mMaxThreads && in getAndExecuteCommand()
454 mProcess->mMaxThreads > 1 && mProcess->mStarvationStartTimeMs == 0) { in getAndExecuteCommand()
455 mProcess->mStarvationStartTimeMs = uptimeMillis(); in getAndExecuteCommand()
457 pthread_mutex_unlock(&mProcess->mThreadCountLock); in getAndExecuteCommand()
461 pthread_mutex_lock(&mProcess->mThreadCountLock); in getAndExecuteCommand()
462 mProcess->mExecutingThreadsCount--; in getAndExecuteCommand()
463 if (mProcess->mExecutingThreadsCount < mProcess->mMaxThreads && in getAndExecuteCommand()
464 mProcess->mStarvationStartTimeMs != 0) { in getAndExecuteCommand()
465 int64_t starvationTimeMs = uptimeMillis() - mProcess->mStarvationStartTimeMs; in getAndExecuteCommand()
470 mProcess->mMaxThreads, starvationTimeMs, in getAndExecuteCommand()
471 mProcess->mMaxThreads > 1 ? "" : " (may be a false alarm)"); in getAndExecuteCommand()
473 mProcess->mStarvationStartTimeMs = 0; in getAndExecuteCommand()
475 pthread_cond_broadcast(&mProcess->mThreadCountDecrement); in getAndExecuteCommand()
476 pthread_mutex_unlock(&mProcess->mThreadCountLock); in getAndExecuteCommand()
511 refs->decWeak(mProcess.get()); in processPendingDerefs()
521 obj->decStrong(mProcess.get()); in processPendingDerefs()
538 refs->decWeak(mProcess.get()); in processPostWriteDerefs()
544 obj->decStrong(mProcess.get()); in processPostWriteDerefs()
563 mProcess->mDriverFD, result); in joinThreadPool()
583 if (mProcess->mDriverFD <= 0) { in setupPolling()
590 mProcess->setThreadPoolConfiguration(1, true /* callerWillJoin */); in setupPolling()
594 *fd = mProcess->mDriverFD; in setupPolling()
615 int fd = mProcess->mDriverFD; in stopProcess()
616 mProcess->mDriverFD = -1; in stopProcess()
695 proxy->incStrong(mProcess.get()); in incStrongHandle()
712 proxy->getWeakRefs()->incWeak(mProcess.get()); in incWeakHandle()
752 self()->mProcess->expungeHandle(handle, binder); // NOLINT in expungeHandle()
772 : mProcess(ProcessState::self()), in IPCThreadState()
778 mCallRestriction(mProcess->mCallRestriction) { in IPCThreadState()
892 if (mProcess->mDriverFD <= 0) { in talkWithDriver()
942 if (ioctl(mProcess->mDriverFD, BINDER_WRITE_READ, &bwr) >= 0) in talkWithDriver()
949 if (mProcess->mDriverFD <= 0) { in talkWithDriver()
1046 return (mIsLooper && mProcess->mMaxThreads <= 1) || mIsPollingThread; in isOnlyBinderThread()
1072 obj->incStrong(mProcess.get()); in executeCommand()
1098 refs->incWeak(mProcess.get()); in executeCommand()
1121 const bool success = refs->attemptIncStrong(mProcess.get()); in executeCommand()
1274 mProcess->spawnPooledThread(false); in executeCommand()
1300 if (self->mProcess->mDriverFD > 0) { in threadDestructor()
1301 ioctl(self->mProcess->mDriverFD, BINDER_THREAD_EXIT, 0); in threadDestructor()