Make main thread used for common jobs
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 27 Mar 2017 20:49:44 +0000 (22:49 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 27 Mar 2017 20:49:44 +0000 (22:49 +0200)
commitf9fc4077cc0eb167f3e65f54cc27717c79beee92
tree46482fa5b4ddd6912867c83047f9eeedb5b6f0e3
parentc3d27b0ac659776f4065bc04b94f12c6b7e40084
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>
src/jobs.c
src/jobs.h
src/main.c