function reads a queue message from the kernel and copies it to
the memory pointed to by
to a maximum length of
parameter is a context handle which must previously have been returned
successfully from a call to
The caller is responsible for ensuring that the memory pointed to by
is large enough to contain
parameter may be used to set a timeout for the operation, specified in microseconds.
This is implemented internally by the library via the
system call. A value of zero provides normal, backwards-compatible blocking behaviour
with no timeout. A negative value causes the function to return immediately.
Data returned via
should not be accessed directly. Use the
functions to access the queue message in the buffer.
On failure, -1 is returned.
On success, a non-zero positive value is returned when no timeout
value is specified.
On success with a timeout value specified, zero is returned if no data
was available to read, or if a non-blocked signal was caught. In the
latter case, the global
value will be set to
On error, a descriptive error message will be available
function may return successfully, the queue message copied to the buffer
may itself be an error message from a higher level kernel component. Use
to determine if it is an error message, and
to access the value of the message.