core.sys.posix.mqueue

D header file for Posix Message Queues

Defines external functions required to manage Posix Message Queues

mq_open(3) open a message queue mq_close(3) close a message queue mq_unlink(3) remove a message queue mq_send(3) send a message mq_receive(3) receive a message mq_timedsend(3) send a message with a timeout (linux specific) mq_timedreceive(3) receive a message with a timeout (linux specific) mq_getattr(3) get message queue attributes mq_setattr(3) set message queue attributes mq_notify(3) register asynchronous notify

Members

Aliases

mqd_t
alias mqd_t = int

Message queue descriptor.

Functions

mq_close
int mq_close(mqd_t mqdes)

Closes the message queue descriptor mqdes.

mq_getattr
int mq_getattr(mqd_t mqdes, mq_attr* mqstat)

Query status and attributes of message queue mqdes.

mq_notify
int mq_notify(mqd_t mqdes, const(sigevent)* notification)

Register for notification when a message is available

mq_open
mqd_t mq_open(const(char)* name, int oflag, ...)

Establish connection between a process and a message queue name.

mq_receive
ssize_t mq_receive(mqd_t mqdes, char* msg_ptr, size_t msg_len, uint* msg_prio)

Receive the oldest message with the highest priority the message queue

mq_send
int mq_send(mqd_t mqdes, const(char)* msg_ptr, size_t msg_len, uint msg_prio)

Add a message to a message queue.

mq_timedreceive
ssize_t mq_timedreceive(mqd_t mqdes, char* msg_ptr, size_t msg_len, uint* msg_prio, const(timespec)* abs_timeout)

Receive the oldest message with the highest priority the message queue, wait up to a certain timeout.

mq_timedsend
int mq_timedsend(mqd_t mqdes, const(char)* msg_ptr, size_t msg_len, uint msg_prio, const(timespec)* abs_timeout)

Add a message to a message queue, block up to a certain time if the queue is full.

mq_unlink
int mq_unlink(const(char)* name)

Remove the specified message queue name.

Structs

mq_attr
struct mq_attr

Used in getting and setting the attributes of a message queue.

See Also

Meta

Standards

POSIX.1-2001.

Authors

Andreas Bok Andersen, Mathias Lang