Thread notification

To create a thread whenever the timer fires, set the sigev_notify field to SIGEV_THREAD and fill these fields:

Field Value and meaning
sigev_notify_function Address of void * function that accepts a void * to be called when the event triggers.
sigev_value Value passed as the parameter to the sigev_notify_function() function.
sigev_notify_attributes Thread attributes structure (see the Processes and Threads chapter, under “The thread attributes structure” for details).
Note: This notification type is a little scary! You could have a whole slew of threads created if the timer fires often enough and, if there are higher priority threads waiting to run, this could chew up all available resources on the system! Use with caution!