diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-04-06 10:31:09 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-04-06 10:31:28 +0200 |
commit | c186dfbdbd43f5b51a67812ad48e1df1eacf131e (patch) | |
tree | 595464a4028f6d548260323120efa0c233adb12c /src/jobs.h | |
parent | 9fe2dfd3c4df334607083f989346090e1051a565 (diff) |
Add an easy function for synchronous calls
The added function, 'jobs_call', allows to call
a job with 'group' sequencing and 'timeout'
handling synchronously.
The difference with 'jobs_enter' is that the
function 'jobs_call' assert that the job is
terminated when 'callback' returns.
Change-Id: I8c01d1cd017787ca0448b03a899305a9069ebb6c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/jobs.h')
-rw-r--r-- | src/jobs.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -54,6 +54,12 @@ extern int jobs_enter( extern int jobs_leave(struct jobloop *jobloop); +extern int jobs_call( + void *group, + int timeout, + void (*callback)(int, void*), + void *arg); + extern struct sd_event *jobs_get_sd_event(); extern void jobs_terminate(); |