Loading system/osi/src/alarm.c +8 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,13 @@ #include "osi/include/semaphore.h" #include "osi/include/thread.h" // Make callbacks run at high thread priority. Some callbacks are used for audio // related timer tasks as well as re-transmissions etc. Since we at this point // cannot differentiate what callback we are dealing with, assume high priority // for now. // TODO(eisenbach): Determine correct thread priority (from parent?/per alarm?) static const int CALLBACK_THREAD_PRIORITY_HIGH = -19; struct alarm_t { // The lock is held while the callback for this alarm is being executed. // It allows us to release the coarse-grained monitor lock while a potentially Loading Loading @@ -249,6 +256,7 @@ static bool lazy_initialize(void) { goto error; } thread_set_priority(callback_thread, CALLBACK_THREAD_PRIORITY_HIGH); thread_post(callback_thread, callback_dispatch, NULL); return true; Loading Loading
system/osi/src/alarm.c +8 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,13 @@ #include "osi/include/semaphore.h" #include "osi/include/thread.h" // Make callbacks run at high thread priority. Some callbacks are used for audio // related timer tasks as well as re-transmissions etc. Since we at this point // cannot differentiate what callback we are dealing with, assume high priority // for now. // TODO(eisenbach): Determine correct thread priority (from parent?/per alarm?) static const int CALLBACK_THREAD_PRIORITY_HIGH = -19; struct alarm_t { // The lock is held while the callback for this alarm is being executed. // It allows us to release the coarse-grained monitor lock while a potentially Loading Loading @@ -249,6 +256,7 @@ static bool lazy_initialize(void) { goto error; } thread_set_priority(callback_thread, CALLBACK_THREAD_PRIORITY_HIGH); thread_post(callback_thread, callback_dispatch, NULL); return true; Loading