|
|
cc [options] -Kthread file
#include <signal.h>
The sigevent structure is used by the asynchronous I/O request routines aio_read and aio_write to select and set up completion notification. The sigevent structure is a component of the aiocb asynchronous I/O control block structure. This structure is declared in siginfo.h and is included by signal.h. Int contains the following elements:
union sigval int sival_int; /* integer value */ void *sival_ptr; /* pointer value */int sigev_notify; /* notification mode */ union notinfo sigev_notifyinfo; union sigval sigev_value; /* signal value */ sigev_func notifyinfo.nifunc sigev_signo notifyinfo.nisigno
If you do not wish to be notified when using asynchronous I/O, set the sigev_notify element to SIGEV_NONE.
If notification via function callback is desired, sigev_notify should be set to SIGEV_CALLBACK and sigev_func should be set to the address of the function to be called. sigev_value should be set to the value to be passed to the function called. Often, it is convenient to pass the address of the asynchronous control block corresponding to the request in sigev_value.