This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Receive an asynchronous message
#include <sys/neutrino.h> #include <sys/asyncmsg.h> struct asyncmsg_get_header* asyncmsg_get(int chid)
libasyncmsg
Use the -l asyncmsg option to qcc to link against this library.
The asyncmsg_get() function receives one to five asynchronous messages from the channel identified by the chid argument. In order to receive more messages, you must call this function in a loop until you get a NULL return and EAGAIN to signify that you've drained the queue of messages.
The above description is the current behavior that may change in future. |
A pointer to _asyncmsg_get_header(), if the message was successfully received; or NULL if an error occurred (errno is set). The _asyncmsg_get_header(), call provides the receive message header used to receive an asynchronous message.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
asyncmsg_channel_create(), asyncmsg_channel_destroy(), asyncmsg_connect_attach(), asyncmsg_connect_attr(), asyncmsg_connect_detach(), asyncmsg_flush(), asyncmsg_free(), asyncmsg_malloc(), asyncmsg_put(), asyncmsg_putv()
Asynchronous Messaging Technote