diff options
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etTimer.c')
-rw-r--r-- | runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etTimer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etTimer.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etTimer.c index 09606b8b0..5865d9269 100644 --- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etTimer.c +++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etTimer.c @@ -94,7 +94,13 @@ static void timerHandler(int sig, siginfo_t *si, void *uc) { etTimer* timer = si->si_value.sival_ptr; int sval = 0; - /* Do not acquire the timer mutex in the handler! See signal-safety in linux manual. */ + /* + * Do not acquire the timer mutex in the handler! + * See signal-safety in linux manual. + * Amongst other things, this can cause deadlocks + * when the thread that executes the signal handler already holds the lock + * and then tries to acquire it again in the signal handler. + */ timer->osTimerData.signaled = ET_TRUE; sem_getvalue(&(timer_sema.osData), &sval); |