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:33:31 +0000 (07:33 +0100)
commit8a0bde7a0b5b61a08a43a5bf374fc4705b788684
tree7366ac26121545d2b8e6c3b4ed59f745e5782c35
parent2195a00dc5b70636ccf57563cf907cb3a4b62afc
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