summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-02-06 17:16:09 +0100
committerJose Bollo <jose.bollo@iot.bzh>2019-02-06 17:27:11 +0100
commitfcd68bb0f872c65c4317377f787f5fdddea6e5d0 (patch)
treede1fa0464ebda4ff12477f7b8fc43957a6b4461c /src
parent77bf8a30c07a4ab5690337ed362dae4414e590fb (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jobs.c b/src/jobs.c
index 4a88c303..d06d24cf 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -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;