SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fast_mutex.h File Reference

Go to the source code of this file.

Data Structures

class  fast_mutex
class  fast_mutex_autolock

Macros

#define __VOLATILE
#define _FAST_MUTEX_ASSERT(_Expr, _Msg)   ((void)0)
#define _FAST_MUTEX_CHECK_INITIALIZATION   1
#define _NOTHREADS

Detailed Description

A fast mutex implementation for POSIX and Win32.

Version
1.20, 2010/05/16
Author
Wu Yongwei

Definition in file fast_mutex.h.

Macro Definition Documentation

#define __VOLATILE

Macro alias to `volatile' semantics. Here it is not truly volatile since it is in a single-threaded environment.

Definition at line 255 of file fast_mutex.h.

#define _FAST_MUTEX_ASSERT (   _Expr,
  _Msg 
)    ((void)0)

Macro for fast_mutex assertions. Fake version (for release mode).

Definition at line 100 of file fast_mutex.h.

Referenced by fast_mutex::lock(), fast_mutex::unlock(), and fast_mutex::~fast_mutex().

#define _FAST_MUTEX_CHECK_INITIALIZATION   1

Macro to control whether to check for initialization status for each lock/unlock operation. Defining it to a non-zero value will enable the check, so that the construction/destruction of a static object using a static fast_mutex not yet constructed or already destroyed will work (with lock/unlock operations ignored). Defining it to zero will disable to check.

Definition at line 80 of file fast_mutex.h.

#define _NOTHREADS

Definition at line 58 of file fast_mutex.h.