The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 [Cписок руководств | Печать]

_signotifywait (2)
  • >> _signotifywait (2) ( Solaris man: Системные вызовы )
         _signotifywait, _lwp_sigredirect - deliver  process  signals
         to specific LWPs
         #include <sys/lwp.h>
         int _signotifywait(void);
         int _lwp_sigredirect(lwpid_t target_lwp,  int  signo  ,  int
         In a multithreaded process, signals that are generated for a
         process  are  delivered  to one of the threads that does not
         have that signal masked. If all of the  application  threads
         are  masking  that  signal,  its delivery waits until one of
         them unmasks it.
         The disposition of the each thread's signal mask is  unknown
         to the kernel when it generates signals for the process. The
         _signotifywait() and _lwp_sigredirect() functions provide  a
         mechanism  to  direct instances of signals generated for the
         process to application-specified LWPs. Each  process  has  a
         set  of  signals  pending  for the process, and for each LWP
         there is a set of signals pending for that LWP. If  no  sig-
         nals are pending, these sets are empty.
         There is also a process-wide signal set, termed the  notifi-
         cation  set,  manipulated  by these functions. A signal gen-
         erated for the process where the signal number is not in the
         notification set is called an  unnotified signal.
         In a multithreaded program there is an aslwp, a special  LWP
         endowed with powers to handle signals that are generated for
         a process. The  _signotifywait() function is used  to  await
         signals generated for the process, and should be called only
         from the aslwp. In general, these functions are  not  to  be
         called from the application-level.
         If  there  is  a  pending  unnotified  signal  when  _signo-
         tifywait()  is  called, that signal is selected and the call
         returns immediately. If there is not a signal  pending,  the
         call  suspends  the  calling  LWP until the generation of an
         unnotified signal; that signal  then  is  selected  and  the
         function  returns. In both cases, the selected signal number
         is set in the notification set and returned as the value  of
         _signotifywait().  The  signal  remains pending for the pro-
         cess, and any associated siginfo(3HEAD) information  remains
         queued at the process.
         The _lwp_sigredirect() function requests that a signal pend-
         ing  for  the  process  be delivered to the LWP specified by
         target_lwp. If target_lwp is  0, the  signal  is  discarded.
         It is an error if signo is not currently in the notification
         set of the process. The signal specified by signo is removed
         from  pending  for  the  process and is made pending for the
         target_lwp. If there is an  associated  siginfo  information
         structure  queued  at the process, that siginfo is queued to
         the target_lwp.
         Whenever a signal is cleared from the set of signals pending
         for  the  process,  the corresponding signal is cleared from
         the  notification  set.   After   a   successful   call   to
         _lwp_sigredirect(),  the  signal  signo  is cleared from the
         notification set and from the set of signals pending for the
         process. If another instance of signo is queued for the pro-
         cess, the signal number is again set in the process  pending
         mask,  and  if  another  LWP is blocked in a call to _signo-
         tifywait(), its wait for an unnotified signal will be satis-
         fied.  The  effects  described  in this paragraph also apply
         when  the  signal  signo  is   returned   by   a   call   to
         sigtimedwait()  and  signo   was not pending for the calling
         When queued is non-NULL, and there is  another  instance  of
         the signal (signo), a non-zero value will be place in queued
         to indicate that more than one instance  of  the  signal  is
         pending on the process.
         The  _signotifywait() function returns the signal number  of
         the    pending   but   hitherto   unnotified   signal.   The
         _lwp_sigredirect() function returns  0  when  successful.  A
         non-zero value indicates an error.
         No error conditions are specified for _signotifywait().
         If the following conditions occurs, _lwp_sigredirect() fails
         and return the corresponding value:
               The signal signo was not pending for the  process,  or
               signo was not in the notification set.
         ESRCH The target_lwp cannot be found in the current process.
         _lwp_create(2),       _lwp_kill(2),       sigtimedwait(3RT),
         siginfo(3HEAD), signal(3HEAD)
         This  mechanism  for  delivering  signals  to  multithreaded
         processes  is  subject  to  change  in  future  versions  of
         Solaris.   Any  process  with  explicit  knowledge  of  this
         mechanism may not be compatible from release to release.

    Поиск по тексту MAN-ов: 

    Inferno Solutions
    Hosting by

    Закладки на сайте
    Проследить за страницей
    Created 1996-2021 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру