QNX Developer Support
![]() |
![]() |
![]() |
![]() |
asyncmsg_get()
Receive an asynchronous message
Synopsis:
#include <sys/neutrino.h> #include <sys/asyncmsg.h> struct asyncmsg_get_header* asyncmsg_get(int chid)
Arguments:
- chid
- The channel ID.
Library:
libasyncmsg
Use the -l asyncmsg option to qcc to link against this library.
Description:
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. |
Returns:
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.
Errors:
- EBADF
- The channel specified by chid doesn't exist.
- EFAULT
- A fault occurred when the kernel tried to access the buffers provided.
- EMSGSIZE
- The buffer provided isn't big enough to hold the received message.
- EAGAIN
- No message is available at this time.
Classification:
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
See also:
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
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)

