sys_mq_timedreceive  [ipc/mqueue.c]


Removes a message from an open POSIX message queue.

Arguments

eax 280
ebx Open message queue descriptor.
ecx Pointer to a buffer which will receive the message.
edx Size of the buffer pointed by ecx.
esi Non-negative integer that specifies the priority of this message. Messages are placed on the queue in decreasing order of priority, with newer messages of the same priority being placed after older messages with the same priority.
edi If the queue is full and the O_NONBLOCK flag is not enabled for the message queue description, then edi points to a timespec structure which specifies a ceiling on the time for which the call will block. This ceiling is an absolute timeout in seconds and nanoseconds since the Epoch (midnight on the morning of 1 January 1970).

Return values

If the system call succeeds the return value is 0.
If the system call fails the return value is one of the following errno values:

-EAGAIN The queue was empty, and the O_NONBLOCK flag was set for the message queue.
-EBADF The descriptor specified in ebx was invalid.
-EMSGSIZE edx was greater than the mq_msgsize attribute of the message queue.
-EINTR The call was interrupted by a signal handler.
-EINVAL The call would have blocked, and timespec pointed by edi was invalid, either because tv_sec was less than zero, or because tv_nsec was less than zero or greater than 1000 million.
-ETIMEDOUT The call timed out before a message could be transferred.

Remarks

See samples/ipc/posix_msg.asm for an example.

Compatibility

n/a