aboutsummaryrefslogtreecommitdiffstats
path: root/src/jobs.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-03-27 22:49:44 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-03-27 22:49:44 +0200
commitf9fc4077cc0eb167f3e65f54cc27717c79beee92 (patch)
tree46482fa5b4ddd6912867c83047f9eeedb5b6f0e3 /src/jobs.h
parentc3d27b0ac659776f4065bc04b94f12c6b7e40084 (diff)
Make main thread used for common jobs
This commit make the main thread behaving like any other threads. The main loop is shared across threads, the first one without job taking it. The main event loop now have the lowest priority. It is activated only when no job is queued. This has the good effect to not try to overfill the queue of jobs. Change-Id: I07cecc9d94a02134c63bc2a814db56e171ab719e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/jobs.h')
-rw-r--r--src/jobs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jobs.h b/src/jobs.h
index ef72e0c1..b6f277c5 100644
--- a/src/jobs.h
+++ b/src/jobs.h
@@ -38,7 +38,10 @@ extern int jobs_queue3(
void *arg2,
void *arg3);
+extern int jobs_add_event_loop(void *key, int timeout, void (*evloop)(int, void*), void *closure);
+
extern int jobs_init(int allowed_count, int start_count, int waiter_count);
+extern int jobs_add_me();
extern void jobs_terminate();