diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-04-26 23:49:53 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-04-26 23:49:53 +0200 |
commit | d4971502588558cd3ee8e1243962e5782ea42d3f (patch) | |
tree | 381529b326a19d8823d60805ff21db3fb2d415ea /src | |
parent | m (diff) | |
download | bus-d4971502588558cd3ee8e1243962e5782ea42d3f.tar.gz bus-d4971502588558cd3ee8e1243962e5782ea42d3f.tar.bz2 bus-d4971502588558cd3ee8e1243962e5782ea42d3f.tar.xz |
derp
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/bus.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -685,13 +685,14 @@ bus_poll_stop(const bus_t *bus) const char * bus_poll(bus_t *bus) { - if (bus->first_poll) { - bus->first_poll = 0; + if (!bus->first_poll) { t(release_semaphore(bus, W, SEM_UNDO)); t(acquire_semaphore(bus, S, SEM_UNDO)); t(zero_semaphore(bus, S)); t(release_semaphore(bus, S, SEM_UNDO)); t(acquire_semaphore(bus, W, SEM_UNDO)); + } else { + bus->first_poll = 0; } t(release_semaphore(bus, Q, 0)); t(zero_semaphore(bus, Q)); |