| Main index | Section 2 | Options |
#include <time.h>
#include <signal.h>
The evp argument, if non- NULL, points to a sigevent structure. This structure, allocated by the application, defines the asynchronous notification to occur when the timer expires.
If evp->sigev_notify is SIGEV_SIGNO or SIGEV_THREAD_ID, the signal specified in evp->sigev_signo will be sent to the calling process ( SIGEV_SIGNO) or to the thread whose LWP ID is evp->sigev_notify_thread_id ( SIGEV_THREAD_ID). The information for the queued signal will include:
| Member | Value |
| si_code | SI_TIMER |
| si_value | the value stored in evp->sigev_value |
| si_timerid | timer ID |
| si_overrun | timer overrun count |
| si_errno | If timer overrun is { DELAYTIMER_MAX}, an error code defined in <errno.h> |
If the evp argument is NULL, the effect is as if the evp argument pointed to a sigevent structure with the sigev_notify member having the value SIGEV_SIGNAL, the sigev_signo having a default signal number ( SIGALRM), and the sigev_value member having the value of the timer ID.
This implementation supports a clock_id of CLOCK_REALTIME or CLOCK_MONOTONIC.
If evp->sigev_notify is SIGEV_THREAD and sev->sigev_notify_attributes is not NULL, if the attribute pointed to by sev->sigev_notify_attributes has a thread stack address specified by a call to pthread_attr_setstack() or pthread_attr_setstackaddr(), the results are unspecified if the signal is generated more than once.
| [EAGAIN] | |
| The calling process has already created all of the timers it is allowed by this implementation. | |
| [EINVAL] | |
| The specified clock ID is not supported. | |
| [EINVAL] | |
| The specified asynchronous notification method is not supported. | |
| [EFAULT] | |
| Any arguments point outside the allocated address space or there is a memory protection fault. | |
| TIMER_CREATE (2) | July 15, 2016 |
| Main index | Section 2 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | The most horrifying thing about Unix is that, no matter how many times you hit yourself over the head with it, you never quite manage to lose consciousness. It just goes on and on. | ” |
| — Patrick Sobalvarro | ||