Reference

rt_mq_send(2)

message queue 'send' operation

NAME

rt_mq_send - message queue 'send' operation

SYNOPSIS

#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include rt_ipc.h

int rt_mq_send(rt_mq_t *mq, char *msg, RT_MQ_PRIO prio, RTIME wait);

DESCRIPTION

rt_mq_send enqueues the data msg on the message queue mq. The data is assumed to be of the size with which rt_mq_init was called. If prio is RT_MQ_NORMAL, the data is queued at the end. If prio is RT_MQ_URGENT, the data is forced to the front of the queue. An optional timeout can be specified. If wait is RT_WAIT_FOREVER, the function does not time out. If wait is RT_NO_WAIT and the semaphore is not available, rt_mq_send returns immediately. If wait is any other value, it represent a time at which the call to rt_mq_send should time out. If that time is reached, rt_mq_send returns with -ETIME.

RETURN VALUE

On success, 0 is returned. On failure, a negative value is returned as described below.

ERRORS

-ETIME

The timeout period expired.

-EAGAIN

wait was RT_NO_WAIT, and no space was available on the queue.

-EINVAL

mq does not point to a valid rt_mq_t.

AUTHOR

Jerry Epplin <[email protected]>

SEE ALSO

rt_mq_destroy(2), rt_mq_init(2), rt_mq_receive(2), rt_task_ipc_delete(2), rt_task_ipc_init(2)