diff options
author | Mathias Agopian <mathias@google.com> | 2012-04-17 16:11:08 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-04-18 17:50:03 -0700 |
commit | 1b80f793d2328dd94a151411a1cc3a676121ffc7 (patch) | |
tree | b0cff08b9879946de7b4218fd09c1467e39e5c46 /libs/binder | |
parent | aa1667f006b8900c63f9b8de6883f06dc3980b91 (diff) | |
download | frameworks_native-1b80f793d2328dd94a151411a1cc3a676121ffc7.tar.gz frameworks_native-1b80f793d2328dd94a151411a1cc3a676121ffc7.tar.bz2 frameworks_native-1b80f793d2328dd94a151411a1cc3a676121ffc7.zip |
add set thread count
Change-Id: I70f02908d8362a465eb8a2a24356f6989847f7ba
Diffstat (limited to 'libs/binder')
-rw-r--r-- | libs/binder/ProcessState.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 5399e5288..d95fd6fa9 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -295,6 +295,15 @@ void ProcessState::spawnPooledThread(bool isMain) } } +status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) { + status_t result = NO_ERROR; + if (ioctl(mDriverFD, BINDER_SET_MAX_THREADS, &maxThreads) == -1) { + result = -errno; + ALOGE("Binder ioctl to set max threads failed: %s", strerror(-result)); + } + return result; +} + static int open_driver() { int fd = open("/dev/binder", O_RDWR); |