1 .\" Copyright (C) 2006, 2010 Michael Kerrisk <mtk.manpages@gmail.com>
2 .\" Copyright (C) 2009 Petr Baudis <pasky@suse.cz>
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"*******************************************************************
26 .\" This file was generated with po4a. Translate the source file.
28 .\"*******************************************************************
29 .TH SIGEVENT 7 2011\-09\-09 GNU "Linux Programmer's Manual"
31 sigevent \- structure for notification from asynchronous routines
35 union sigval { /* Data passed with notification */
36 int sival_int; /* Integer value */
37 void *sival_ptr; /* Pointer value */
41 int sigev_notify; /* Notification method */
42 int sigev_signo; /* Notification signal */
43 union sigval sigev_value; /* Data passed with
45 void (*sigev_notify_function) (union sigval);
46 /* Function used for thread
47 notification (SIGEV_THREAD) */
48 void *sigev_notify_attributes;
49 /* Attributes for notification thread
51 pid_t sigev_notify_thread_id;
52 /* ID of thread to signal (SIGEV_THREAD_ID) */
57 The \fIsigevent\fP structure is used by various APIs to describe the way a
58 process is to be notified about an event (e.g., completion of an
59 asynchronous request, expiration of a timer, or the arrival of a message).
61 The definition shown in the SYNOPSIS is approximate: some of the fields in
62 the \fIsigevent\fP structure may be defined as part of a union. Programs
63 should only employ those fields relevant to the value specified in
66 The \fIsigev_notify\fP field specifies how notification is to be performed.
67 This field can have one of the following values:
70 A "null" notification: don't do anything when the event occurs.
73 Notify the process by sending the signal specified in \fIsigev_signo\fP.
75 If the signal is caught with a signal handler that was registered using the
76 \fBsigaction\fP(2) \fBSA_SIGINFO\fP flag, then the following fields are set in
77 the \fIsiginfo_t\fP structure that is passed as the second argument of the
82 This field is set to a value that depends on the API delivering the
86 This field is set to the signal number (i.e., the same value as in
90 This field is set to the value specified in \fIsigev_value\fP.
93 Depending on the API, other fields may also be set in the \fIsiginfo_t\fP
96 The same information is also available if the signal is accepted using
100 Notify the process by invoking \fIsigev_notify_function\fP "as if" it were the
101 start function of a new thread. (Among the implementation possibilities
102 here are that each timer notification could result in the creation of a new
103 thread, or that a single thread is created to receive all notifications.)
104 The function is invoked with \fIsigev_value\fP as its sole argument. If
105 \fIsigev_notify_attributes\fP is not NULL, it should point to a
106 \fIpthread_attr_t\fP structure that defines attributes for the new thread (see
107 \fBpthread_attr_init\fP(3)).
109 \fBSIGEV_THREAD_ID\fP (Linux\-specific)
110 .\" | SIGEV_SIGNAL vs not?
111 Currently used only by POSIX timers; see \fBtimer_create\fP(2).
115 \fBtimer_create\fP(2), \fBaio_fsync\fP(3), \fBaio_read\fP(3), \fBaio_write\fP(3),
116 \fBgetaddrinfo_a\fP(3), \fBlio_listio\fP(3), \fBmq_notify\fP(3), \fBaio\fP(7),