diff options
author | Frederic Marec <frederic.marec@iot.bzh> | 2019-03-22 11:03:44 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-03-22 17:14:38 +0100 |
commit | 4789efd07382227aed86d8be8f91dd33bcb394d2 (patch) | |
tree | dcad318750369e603012a0e7e568bce7f4d441aa | |
parent | 3922f07ae1eda1de5d84832c25197296d1c10311 (diff) |
jobs: Ensure validy of event loop
In rare circumstances during intialization threads should wait instead
of using a null event loop. This is because no one has needed event loop at
this stage of initialization.
Change-Id: I05b6ddbc05bec50958d0981213219b1d641401a5
Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
-rw-r--r-- | src/jobs.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -355,6 +355,9 @@ static int evloop_get() if (evloop.holder) return evloop.holder == ct; + if (!evloop.sdev) + return 0; + ct->nholder = NULL; evloop.holder = ct; return 1; |