diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-05-17 14:28:20 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-05-17 14:28:20 +0200 |
commit | 0f31d194025df5d63fcee65e32baa90cc5aa0ad6 (patch) | |
tree | 83ff9e158ba9df44dc8bb1a3c4ff6304ceb86a29 /doc/examples/nonblocking | |
parent | implemented timed write, read and poll (diff) | |
download | bus-0f31d194025df5d63fcee65e32baa90cc5aa0ad6.tar.gz bus-0f31d194025df5d63fcee65e32baa90cc5aa0ad6.tar.bz2 bus-0f31d194025df5d63fcee65e32baa90cc5aa0ad6.tar.xz |
add timed example and fix timed polling
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | doc/examples/nonblocking/poll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/examples/nonblocking/poll.c b/doc/examples/nonblocking/poll.c index c918b5b..2b0c266 100644 --- a/doc/examples/nonblocking/poll.c +++ b/doc/examples/nonblocking/poll.c @@ -14,9 +14,9 @@ int main() const char *message; long long tick = 0; t(bus_open(&bus, "/tmp/example-bus", BUS_RDONLY)); - t(bus_poll_start(&bus, BUS_NOWAIT)); + t(bus_poll_start(&bus)); for (;;) { - message = bus_poll(&bus); + message = bus_poll(&bus, BUS_NOWAIT); if (message == NULL) { t(errno != EAGAIN); printf("waiting... %lli\n", ++tick); |