jobs: Fix possible race condition
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 30 Nov 2017 06:17:31 +0000 (07:17 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 30 Nov 2017 06:17:31 +0000 (07:17 +0100)
commitb0c0093229eea9aabed1385cc9f4c5a27a7c0a87
tree588dc8d4bd942ffc91aecf1373793535c49d490b
parent4cf8ee09b51ff41018fbdace63d71a07adf88a09
jobs: Fix possible race condition

Sending the signal while not being sure that is is
expected could be a race condition. Taking the mutex
avoids it.

In the same time, switch to broadcasting.

Change-Id: I3f43d0d860cccc61ec140ceef223f572f806872c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/jobs.c