dnxSleep.h File Reference

Types and definitions for DNX cancelable sleep routines. More...

Go to the source code of this file.

Functions

void dnxCancelableSleep (int msecs)
 A millisecond-resolution sleep routine that can be cancelled.


Detailed Description

Types and definitions for DNX cancelable sleep routines.

Author:
John Calcote (jcalcote@users.sourceforge.net)
Attention:
Please submit patches to http://dnx.sourceforge.net

Definition in file dnxSleep.h.


Function Documentation

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().

Parameters:
[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().


Generated on Tue Apr 13 15:48:08 2010 for DNX by  doxygen 1.5.6