mirror of https://github.com/BOINC/boinc.git
API (Android) sched_yield() before sleep() in signal handler
Trying to fix bug where timer thread stops doing anything after first suspend on Android (old, 1-core devices). I suspect that the sleep() in the worker thread's signal handle is sleeping the entire process. Insert a sched_yield() before the sleep so that the time thread will run.
This commit is contained in:
parent
e85a18289e
commit
9eb232ab08
|
@ -1240,7 +1240,12 @@ static void worker_signal_handler(int) {
|
|||
}
|
||||
if (options.direct_process_action) {
|
||||
while (boinc_status.suspended && in_critical_section==0) {
|
||||
#ifdef ANDROID
|
||||
// Suspicion that sleep() sleeps entire process
|
||||
// on old versions of Android
|
||||
//
|
||||
sched_yield();
|
||||
#endif
|
||||
sleep(1); // don't use boinc_sleep() because it does FP math
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue