Fix concurrency issues on event manager
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 30 Mar 2017 11:33:11 +0000 (13:33 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 30 Mar 2017 11:33:11 +0000 (13:33 +0200)
commit89c44a872117fb8f64d38cbccf8f36776f2623f6
tree89b26e67440c1f6f77fc6c1fcdeccf3b1ea1fb37
parent391ada39d89f9f90d186aed8e1d825be9c17a328
Fix concurrency issues on event manager

Having only one event manager is not possible
in multithreading due to the way that systemd
has to manage timer events. We observed that
timers were not armed when set in a thread
because event was polling in an other thread.

This patch provides more than one event manager
and at most as many as the number of threads
avalaible to start.

Change-Id: Iaeab353b7bc79ce61361ab73c7b197a9e69a6109
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-common.c
src/jobs.c
src/jobs.h
src/main.c