diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-05-17 14:32:09 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-05-17 14:32:09 +0200 |
commit | 7a5814ca02265a3c3a9e44713d3708eb4c8d7bb0 (patch) | |
tree | 3103ec79cecfa8cad27c6bd597467af4d2b87ab3 /doc/bus_poll.3 | |
parent | add timed example and fix timed polling (diff) | |
download | bus-7a5814ca02265a3c3a9e44713d3708eb4c8d7bb0.tar.gz bus-7a5814ca02265a3c3a9e44713d3708eb4c8d7bb0.tar.bz2 bus-7a5814ca02265a3c3a9e44713d3708eb4c8d7bb0.tar.xz |
update documentation for bus_poll
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | doc/bus_poll.3 | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/doc/bus_poll.3 b/doc/bus_poll.3 index 9260f48..b22115c 100644 --- a/doc/bus_poll.3 +++ b/doc/bus_poll.3 @@ -6,21 +6,18 @@ bus_poll_start, bus_poll_stop, bus_poll, bus_poll_timed - Wait a message to be b .nf #include <bus.h> .P -int bus_poll_start(bus_t *\fIbus\fP, int \fIflags\fP); +int bus_poll_start(bus_t *\fIbus\fP); int bus_poll_stop(const bus_t *\fIbus\fP); -const char *bus_poll(bus_t *\fIbus\fP); +const char *bus_poll(bus_t *\fIbus\fP, int \fIflags\fP); const char *bus_poll_timed(bus_t *\fIbus\fP, const struct timespec *\fItimeout\fP, clockid_t \fIclockid\fP); .fi .SH DESCRIPTION The .BR bus_poll () function waits for a message to broadcasted on the \fIbus\fP, and return -the message it receives. The function fails if there is not already a -message waiting on the bus when the function is called and (\fIflags\fP -&BUS_NOWAIT) was used the last time -.BR bus_poll_start () -was called. Received messages shall be copied and parsed, and acted -upon, in a separate thread, and +the message it receives. The function fails if (\fIflags\fP &BUS_NOWAIT) +and there is not already a message waiting on the bus. Received messages +shall be copied and parsed, and acted upon, in a separate thread, and .BR bus_poll () or .BR bus_poll_stop () @@ -44,10 +41,7 @@ it will fail and set \fIerrno\fP to \fBEAGAIN\fP. The time is specified as an absolute time using the parameter \fItimeout\fP. The behaviour is unspecified if \fItimeout\fP is \fINULL\fP. \fItimeout\fP is measured with the clock whose ID is specified by the \fIclockid\fP parameter. This -clock must be a predicitable clock. Additionally, the -.BR bus_poll_start () -function must not have been called with (\fIflags\fP &BUS_NOWAIT), -otherwise the behaviour is undefined. +clock must be a predicitable clock. .SH RETURN VALUES Upon successful completion, the functions .BR bus_poll_start () |