diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2019-02-06 17:16:09 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-02-06 19:54:31 +0100 |
commit | 74f381d988cd04707c2044ca2a201ad8bf87a6f3 (patch) | |
tree | f4a9a7dc5a3a810072142d8876c4dfa13955086f /src | |
parent | bc60ee2616f6fa0b9400f38d7808b61f3090c754 (diff) |
jobs: Ensure releasing event loop
The internal functions blocking threads
for implementing call_sync were not releasing
the event loop, leading to deafness of the
binder.
Include a tuto-4 that reproduce the issue
on a binder with the bug and that also shows
interesting usages of the binder.
Bug-AGL: SPEC-2161
Change-Id: I83ad4d55d721a6046e798a5e06967df4dd5a7284
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r-- | src/jobs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -337,7 +337,7 @@ static void evloop_release() { struct thread *nh, *ct = current_thread; - if (evloop.holder == ct) { + if (ct && evloop.holder == ct) { nh = ct->nholder; evloop.holder = nh; if (nh) @@ -397,6 +397,7 @@ static void evloop_acquire() */ static void thread_enter(volatile struct thread *me) { + evloop_release(); /* initialize description of itself and link it in the list */ me->tid = pthread_self(); me->stop = 0; |