Manual Pages for Linux CentOS command on man sigevent
MyWebUniversity

Manual Pages for Linux CentOS command on man sigevent

SIGEVENT(7) Linux Programmer's Manual SIGEVENT(7)

NAME

sigevent - structure for notification from asynchronous routines SYNOPSIS union sigval { /* Data passed with notification */ int sivalint; /* Integer value */ void *sivalptr; /* Pointer value */ }; struct sigevent { int sigevnotify; /* Notification method */ int sigevsigno; /* Notification signal */ union sigval sigevvalue; /* Data passed with notification */ void (*sigevnotifyfunction) (union sigval); /* Function used for thread notification (SIGEVTHREAD) */ void *sigevnotifyattributes; /* Attributes for notification thread (SIGEVTHREAD) */ pidt sigevnotifythreadid; /* ID of thread to signal (SIGEVTHREADID) */ }; DESCRIPTION The sigevent structure is used by various APIs to describe the way a process is to be notified about an event (e.g., completion of an asyn‐ chronous request, expiration of a timer, or the arrival of a message). The definition shown in the SYNOPSIS is approximate: some of the fields in the sigevent structure may be defined as part of a union. Programs should employ only those fields relevant to the value specified in sigevnotify. The sigevnotify field specifies how notification is to be performed. This field can have one of the following values: SIGEVNONE A "null" notification: don't do anything when the event occurs. SIGEVSIGNAL Notify the process by sending the signal specified in sigevsigno. If the signal is caught with a signal handler that was regis‐ tered using the sigaction(2) SASIGINFO flag, then the follow‐ ing fields are set in the siginfot structure that is passed as the second argument of the handler: sicode This field is set to a value that depends on the API delivering the notification. sisigno This field is set to the signal number (i.e., the same value as in sigevsigno). sivalue This field is set to the value specified in sigevvalue. Depending on the API, other fields may also be set in the sig‐ infot structure. The same information is also available if the signal is accepted using sigwaitinfo(2). SIGEVTHREAD Notify the process by invoking sigevnotifyfunction "as if" it were the start function of a new thread. (Among the implemen‐ tation possibilities here are that each timer notification could result in the creation of a new thread, or that a single thread is created to receive all notifications.) The function is invoked with sigevvalue as its sole argument. If sigevnotifyattributes is not NULL, it should point to a pthreadattrt structure that defines attributes for the new thread (see pthreadattrinit(3)).

SIGEVTHREADID (Linux-specific) Currently used only by POSIX timers; see timercreate(2). CONFORMING TO

POSIX.1-2001. SEE ALSO timercreate(2), aiofsync(3), aioread(3), aiowrite(3), getad‐ drinfoa(3), liolistio(3), mqnotify(3), aio(7), pthreads(7) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

GNU 2011-09-09 SIGEVENT(7)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™