ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr, size_t msg_len, unsigned *restrict msg_prio, const struct timespec *restrict abs_timeout);
If the msg_prio argument is not NULL, the priority of the selected message is stored in the location pointed to by the msg_prio argument.
If the specified message queue is empty and does not have
O_NONBLOCK set in its message queue description,
abs_timeout is an absolute time. It expires when
the absolute time passes, as measured by the clock on which timeouts are
based, of it the absolute time has already passed when the function was
The timeout is based on the system clock as returned
The resolution of the timeout is the resolution of the clock on which it is based. The <time.h> header defines the timespec type.
This operation never fails with a timeout if a message can immediately be removed from the message queue. In such a case, the validity of the abs_timeout argument is not checked.
Specifies the maximum wait for receiving a message on the specified message queue.
Specifies the message queue descriptor associated with the message queue on which messages are to be received.
Specifies the size, in bytes, of the buffer where the received message is stored.
Stores the priority of the received message.
Points to the buffer where the received message is stored.
On success, the
The O_NONBLOCK flag was set in the message description associated with mqdes, and the specified message queue is empty.
mqdes is not a valid message queue descriptor open for reading.
There was a data corruption problem with the message.
msg_len is less than the message size attribute of the specified message queue.
A signal interrupted an
The process or thread would have blocked, and the abs_timeout parameter specified an invalid value.
Too much space was requested for the buffer pointed to by msg_ptr.
The O_NONBLOCK flag was not set when the message queue was opened, but no message arrived on the queue before the specified timeout expired.
On the NuTCRACKER Platform, the Windows
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.