#include <signal.h>
union sigval { /* Data passed with notification */
int sival_int; /* Integer value */
void *sival_ptr; /* Pointer value */
};
struct sigevent {
int sigev_notify; /* Notification method */
int sigev_signo; /* Notification signal */
union sigval sigev_value;
/* Data passed with notification */
void (*sigev_notify_function) (union sigval);
/* Function used for thread
notification (SIGEV_THREAD) */
void *sigev_notify_attributes;
/* Attributes for notification thread
(SIGEV_THREAD) */
pid_t sigev_notify_thread_id;
/* ID of thread to signal
(SIGEV_THREAD_ID); Linux-specific */
};
sigevent 構造体は、イベントに関する情報をプロセスに通知するために様々な API で使用される (イベントの例としては、 非同期処理要求の完了、 タイマーの満了、 メッセージの到着など)。
「書式」に記載されている定義はおおよそのものである。 sigevent 構造体のいくつかのフィールドは、 共用体の一部として定義されているものもある。 プログラムは、 sigev_notify で指定された値に応じたフィールドだけを利用すべきである。
sigev_notify フィールドは、通知をどのように処理すべきかを指定する。 このフィールドは、以下のいずれかの値である。
[man1]
[man2]
[man3]
[man4]
[man5]
[man6]
[man7]
[man8]
[a]
[b]
[c]
[d]
[e]
[f]
[g]
[h]
[i]
[j]
[k]
[l]
[m]
[n]
[o]
[p]
[q]
[r]
[s]
[t]
[u]
[v]
[w]
[x]
[y]
[z]