POSIX timer_create
Richard M. Barry
R.Barry at sstl.co.uk
Fri Jun 4 10:36:00 UTC 2004
When I call timer_create in my code, I get a errno=EINVAL. According to the timer_create man page, this means the timerid I used was invalid, but I used CLOCK_REALTIME, so it should be fine. Earlier in the code I set the clock, and it gives me the correct time when I red back the time, so I'm assuming the clock works. What am I missing? The call to timer_create is below:
status = timer_create ( CLOCK_REALTIME, &Procs.event, &Procs.timer_id );
if( status == -1 )
{
syslog( LOG_INFO, "Could not create a timer);
switch (errno) {
case EAGAIN : printf("errno=EAGAIN\n");break;
case EINVAL : printf("errno=EINVAL\n");break;
case ENOSYS : printf("errno=ENOSYS\n");break;
default : printf("Unknown error\n");
}
}
More information about the users
mailing list