aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man/bus_write.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-28 23:44:00 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-28 23:44:00 +0100
commitd26658642e018e36e848caa7d7587a213808913b (patch)
tree8fd12037ab8c61a7a2e33ca1e7a59a106d3947b2 /doc/man/bus_write.3
parentman: broadcast 0 instead of pid if ephemeral (diff)
downloadbus-d26658642e018e36e848caa7d7587a213808913b.tar.gz
bus-d26658642e018e36e848caa7d7587a213808913b.tar.bz2
bus-d26658642e018e36e848caa7d7587a213808913b.tar.xz
move manpages from doc/ to doc/man/
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/man/bus_write.3')
-rw-r--r--doc/man/bus_write.364
1 files changed, 64 insertions, 0 deletions
diff --git a/doc/man/bus_write.3 b/doc/man/bus_write.3
new file mode 100644
index 0000000..4513c29
--- /dev/null
+++ b/doc/man/bus_write.3
@@ -0,0 +1,64 @@
+.TH BUS_WRITE 3 BUS-%VERSION%
+.SH NAME
+bus_write, bus_write_timed - Broadcast a message a bus
+.SH SYNOPSIS
+.LP
+.nf
+#include <bus.h>
+.P
+int bus_write(const bus_t *\fIbus\fP, const char *\fImessage\fP, int \fIflags\fP);
+int bus_write_timed(const bus_t *\fIbus\fP, const char *\fImessage\fP,
+ const struct timespec *\fItimeout\fP, clockid_t \fIclockid\fP);
+.fi
+.SH DESCRIPTION
+The
+.BR bus_write ()
+function broadcasts a message on the bus whose information is stored in
+\fIbus\fP. The message read by the function is stored in the parameter
+\fImessage\fP. It may not exceeed 2048 bytes, including NULL termination.
+.PP
+The
+.BR bus_write ()
+function shall fail, and set \fIerrno\fP to \fIEAGAIN\fP, if the call
+would suspend the process and (\fIflags\fP &BUS_NOWAIT).
+.PP
+The
+.BR bus_write_timed ()
+function behaves like
+.BR bus_write (),
+except if it is not able to write the \fImessage\fP within the specified
+time, 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.
+.SH RETURN VALUES
+Upon successful completion, these functions returns 0. Otherwise the
+function returns -1 and sets \fIerrno\fP to indicate the error.
+.SH ERRORS
+The
+.BR bus_write (3)
+function may fail and set \fIerrno\fP to any of the errors specified for
+.BR semop (3).
+The
+.BR bus_write_timed (3)
+function may also set \fIerrno\fP to any of the errors specified for
+.BR clock_gettime (3).
+.SH SEE ALSO
+.BR bus-create (1),
+.BR bus (5),
+.BR libbus (7),
+.BR bus_open (3),
+.BR bus_read (3),
+.BR bus_poll (3),
+.BR bus_chown (3),
+.BR bus_chmod (3),
+.BR clock_gettime (3)
+.SH AUTHORS
+Principal author, Mattias Andrée. See the LICENSE file for the full
+list of authors.
+.SH LICENSE
+MIT/X Consortium License.
+.SH BUGS
+Please report bugs to https://github.com/maandree/bus/issues or to
+maandree@member.fsf.org