If the argument notification is not
this system call will register the calling process to be notified of message
arrival at an empty message queue associated with the specified message
The notification specified by the
argument will be sent to
the process when the message queue transitions from empty to non-empty.
At any time, only one process may be registered for notification by a
If the calling process or any other process has already
registered for notification of message arrival at the specified message
queue, subsequent attempts to register for that message queue will fail.
argument points to a
structure that defines how the calling process will be notified.
then no signal will be posted, but the error status and the return status
for the operation will be set appropriately.
the signal specified in
will be sent to the calling process
or to the thread whose LWP ID is
The information for the queued signal will include:
| Member|| Value|
| si_code|| SI_MESGQ|
| si_value||the value stored in
and the process is currently registered for notification by the specified
message queue, the existing registration will be removed.
When the notification is sent to the registered process, its registration
The message queue then is available for registration.
If a process has registered for notification of message arrival at a
message queue and some thread is blocked in
waiting to receive a message when a message arrives at the queue, the
arriving message will satisfy the appropriate
The resulting behavior is as if the message queue remains empty, and no
notification will be sent.