#include "dnxSleep.h"
#include <errno.h>
#include <string.h>
#include <time.h>
Go to the source code of this file.
Functions | |
void | dnxCancelableSleep (int msecs) |
A millisecond-resolution sleep routine that can be cancelled. |
Definition in file dnxSleep.c.
void dnxCancelableSleep | ( | int | msecs | ) |
A millisecond-resolution sleep routine that can be cancelled.
The pthreads specification indicates clearly that the sleep() system call MUST be a cancellation point. However, it appears that sleep() on Linux calls a routine named _nanosleep_nocancel, which clearly is not a cancellation point. Oversight? Not even Google appears to know. It seems that most Unix/Linux distros implement sleep in terms of SIGALRM. This is the problem point for creating a cancelable form of sleep().
[in] | msecs | - the number of milli-seconds to sleep. |
Definition at line 50 of file dnxSleep.c.
Referenced by dnxRegistrar(), dnxTimer(), dnxWlmDestroy(), dnxWlmReconfigure(), and dnxWorker().