diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2019-02-06 17:16:09 +0100 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2019-02-06 17:27:11 +0100 |
commit | fcd68bb0f872c65c4317377f787f5fdddea6e5d0 (patch) | |
tree | de1fa0464ebda4ff12477f7b8fc43957a6b4461c /src | |
parent | 77bf8a30c07a4ab5690337ed362dae4414e590fb (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; |