diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-05-03 14:11:43 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-05-07 15:33:26 -0700 |
commit | efa92b2182ab581873aa8e75d596e2e363bd5e6d (patch) | |
tree | 0fe7d35d9678db9416c61cdcc84defd59253c384 /cmds | |
parent | 9f3e1175657425115e863fdb256b83cadedc33e9 (diff) | |
download | frameworks_base-efa92b2182ab581873aa8e75d596e2e363bd5e6d.zip frameworks_base-efa92b2182ab581873aa8e75d596e2e363bd5e6d.tar.gz frameworks_base-efa92b2182ab581873aa8e75d596e2e363bd5e6d.tar.bz2 |
Cleanup some of the thread merging.
Adds an optimization for checking whether a looper is stuck,
with a new Looper method to see if its thread is currently
idle. This will allow us to put a large number of loopers
in the monitor efficiently, since we generally won't have to
do a context switch on each of them (since most looper threads
spend most of their time idle waiting for work).
Also change things so the system process's main thread
is actually running on the main thread. Because Jeff
asked for this, and who am I to argue? :)
Change-Id: I12999e6f9c4b056c22dd652cb78c2453c391061f
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/system_server/library/system_init.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds/system_server/library/system_init.cpp b/cmds/system_server/library/system_init.cpp index 745c34a..3e52d30 100644 --- a/cmds/system_server/library/system_init.cpp +++ b/cmds/system_server/library/system_init.cpp @@ -94,12 +94,12 @@ extern "C" status_t system_init() if (methodId == NULL) { return UNKNOWN_ERROR; } - env->CallStaticVoidMethod(clazz, methodId); - ALOGI("System server: entering thread pool.\n"); + ALOGI("System server: entering thread pool."); ProcessState::self()->startThreadPool(); - IPCThreadState::self()->joinThreadPool(); - ALOGI("System server: exiting thread pool.\n"); + + // This is the main thread of the system server, and will never exit. + env->CallStaticVoidMethod(clazz, methodId); return NO_ERROR; } |