| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- notify process (or thread) that a message is available on a queue
#include <mqueue.h>intmq_notify(mqd_tmqdes,const struct sigevent *notification);
Themq_notify() function provides an asynchronous mechanism for processes to receive noticethat messages are available in a message queue, rather than synchronously blocking(waiting) inmq_receive(3C).
Ifnotification is notNULL, this function registers the calling process tobe notified of message arrival at an empty message queue associated withthe message queue descriptor,mqdes. The notification specified bynotification will be sentto the process when the message queue transitions from empty to non-empty.Seesignal.h(3HEAD). At any time, only one process may be registered for notificationby a specific message queue. If the calling process or any otherprocess has already registered for notification of message arrival at the specifiedmessage queue, subsequent attempts to register for that message queue will fail.
Ifnotification isNULL and the process is currently registered for notificationby the specified message queue, the existing registration is removed. The messagequeue is then available for future registration.
When the notification is sent to the registered process, its registration isremoved. The message queue is then available for registration.
If a process has registered for notification of message arrival at amessage queue and some processes is blocked inmq_receive(3C) waiting to receive amessage when a message arrives at the queue, the arriving message willbe received by the appropriatemq_receive(3C), and no notification will be sent tothe registered process. The resulting behavior is as if the message queueremains empty, and this notification will not be sent until the nextarrival of a message at this queue.
Any notification registration is removed if the calling process either closes themessage queue or exits.
Upon successful completion,mq_notify() returns0; otherwise, it returns-1 and setserrno to indicate the error.
Themq_notify() function will fail if:
Themqdes argument is not a valid message queue descriptor.
A process is already registered for notification by the message queue.
Seeattributes(5) for descriptions of the following attributes:
|
mq_close(3C),mq_open(3C),mq_receive(3C),mq_send(3C),mqueue.h(3HEAD),siginfo.h(3HEAD),signal.h(3HEAD),attributes(5),standards(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |