*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> mq_notify (3c)              
Title
Content
Arch
Section
 

Contents


mq_notify(3c)							 mq_notify(3c)


NAME    [Toc]    [Back]

     mq_notify - register message notification request

C SYNOPSIS    [Toc]    [Back]

     #include <mqueue.h>

     int mq_notify (mqd_t mqd<b>, const struct sigevent *notification<b>);

DESCRIPTION    [Toc]    [Back]

     mq_notify registers a message notification	request	with the message queue
     named by mqd. A message notification is an	asynchronous event which
     informs a process of a message that has arrived on	a previously empty
     queue.  A message queue transition	from empty to non-empty	will result in
     a notification delivery to	the process that registered the	request.

     There can be only one message notification	registered with	a queue	at any
     given time.

     If	the sigev_notify member	of notification	is SIGEV_THREAD	then the
     function sigev_notify_function will be called by a	new thread (see
     pthreads(5)) with sigev_value as the argument.  This thread is created
     when the event arrives with the attributes	specified in
     sigev_notify_attributes except that it is automatically detached.	The
     calling process should ensure there are sufficient	resources to create
     the thread.

     If	the notification argument is NULL and the calling process already has
     a pending notification request, then the pending request will be cleared.
     The message queue will then be available for notification registration.

     Once a message notification is delivered to a process, or the requesting
     process exits before receiving the	notification, then the request is
     cleared.  The message queue will then be available	for notification
     registration.

     If	a message arrives at an	empty queue, and a process is blocked in
     mq_receive	waiting	for a message, then the	waiting	process	will receive
     the message.  In this case, the notification request registered with the
     queue will	have no	effect.

     mq_notify will fail if one	or more	of the following conditions are	true:

     [EBADF]	    The	message	queue descriptor, mqd, is not valid.

     [EBUSY]	    A notification request is already registered with the
		    queue.

     [EINTR]	    A signal interrupted the mq_notify function	call.

     [EAGAIN]	    Insufficient memory	to implement the SIGEV_THREAD service
		    for	notification.




									Page 1






mq_notify(3c)							 mq_notify(3c)


SEE ALSO    [Toc]    [Back]

      
      
     mq_open(3c), intro(3c), mq_unlink(3c), mq_receive(3c), mq_send(3c),
     mq_getattr(3c)

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of	-1 is returned and errno is set	to indicate the	error.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
mq_notify HP-UX register/cancel a notification request with a message queue
mq_notify Tru64 Attaches a request for asynchronous signal notification to a message queue (P1003.1b)
tt_pattern_callback_add HP-UX register a message-matching callback function
tt_orequest_create HP-UX create a request message
tt_prequest_create HP-UX create a procedure request message
mailbox IRIX mail notification
XmPrintPopupPDM HP-UX Send a notification for the PDM to be popped up
kevent OpenBSD kernel event notification mechanism
kqueue OpenBSD kernel event notification mechanism
EvmConnRegistrationGet Tru64 Establishes a subscription for event notification
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service