Attributes for a connection used for asynchronous messages

Asynchronous messaging is an experimental feature; for information about the use of experimental software, see the Commercial Software License Agreement (CSLA) or Partner Software License Agreement (PSLA) in the Licensing area of our website, http://www.qnx.com/legal/licensing/.
Note: Asynchronous messaging support is in its own kernel module. In order to use it, you must add [module=async] to the procnto line of your mkifs buildfile.


#include <sys/asyncmsg.h>

struct _asyncmsg_connection_attr {
    int (*call_back) (int err, 
                      void* buf, 
                      unsigned handle);
    size_t buffer_size;
    unsigned max_num_buffer;
    unsigned trigger_num_msg;
    struct itimertrigger_timer;


The _asyncmsg_connection_attr structure describes connection attributes for use with asynchronous messaging.

The _asyncmsg_connection_attr structure includes these members:

Callback function for notification. The arguments are:
  • err — the error status of the package.
  • buf — a pointer to the package buffer.
  • handle — a handle associated with the callback function.

If call_back isn't NULL, this function is called when an error occurs during send (after asyncmsg_put() returns) with an error number in err and the faulted buffer in buf. If you use your own buffer, this function is also called when a buffer is empty, with err set to EOK.

The message buffer size.
The maximum number of buffers allowed for this connection.
Uses the number of the pending message as triggering criteria.
Uses the time passed since the last kernel call as triggering criteria.


QNX Neutrino