DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

sigevent(5)


sigevent -- Signal Event Structure

Synopsis

   

cc [options] -Kthread file

#include <signal.h>

Description

The signal event structure sigevent is used to select and set up completion notification for asynchronous I/O.

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.

References

aiocb(5), aio_cancel(3aio) aio_read(3aio), aio_suspend(3aio), aio_write(3aio)

Notices

This page is derived from IEEE Draft Standard P1003.4/D14. See copyright page for further information.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004