unixstl/synch/util/features.h File Reference


Detailed Description

[C++ only] Discrimination of synchronisation features (Synchronisation Library).

#include <unixstl/unixstl.h>
#include <unistd.h>

Go to the source code of this file.

Defines

#define UNIXSTL_HAS_ATOMIC_INTEGER_OPERATIONS
 If defined, indicates that the operating system supports atomic integer operations, and that they're safe for use outside the kernel.
#define UNIXSTL_USING_PTHREADS
 If defined, indicates that PThreads is selected.


Define Documentation

#define UNIXSTL_HAS_ATOMIC_INTEGER_OPERATIONS

If defined, indicates that the operating system supports atomic integer operations, and that they're safe for use outside the kernel.

Atomic integer operations are assumed on the following "UNIX" platforms:

  • Mac OS-X (via OSMemoryBarrier(), etc; <libkern/OSAtomic.h>)
  • Win32 (via InterlockedIncrement(), etc; <windows.h>)

or:

  • the symbol UNIXSTL_FORCE_ATOMIC_INTEGER_OPERATIONS is defined. In this case, you must also define UNIXSTL_FORCED_ATOMIC_INT_T (as the atomic integer type, e.g. int) and UNIXSTL_FORCED_ATOMIC_INTEGER_IMPLEMENTATIONS (as the file to be included _inside_ the unixstl namespace in unixstl/synch/atomic_functions.h)

#define UNIXSTL_USING_PTHREADS

If defined, indicates that PThreads is selected.

PThreads is selected if:

  • _POSIX_THREADS is defined and _REENTRANT is defined, or
  • UNIXSTL_FORCE_PTHREADS is defined, which causes <pthread.h> to be included, and the symbol _REENTRANT (and _POSIX_THREADS on Windows) to be defined if they are not already.


Generated on Thu Jun 10 08:58:00 2010 for STLSoft by  doxygen 1.5.6