Added macros for static initialization of mutexes, recursive locks, and
R/W locks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25691 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2b07b8e0f1
commit
2daa4194d4
@ -62,6 +62,18 @@ typedef struct rw_lock {
|
||||
#endif
|
||||
|
||||
|
||||
// static initializers
|
||||
#ifdef KDEBUG
|
||||
# define MUTEX_INITIALIZER(name) { name, NULL, -1, 0 }
|
||||
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), 0 }
|
||||
#else
|
||||
# define MUTEX_INITIALIZER(name) { name, NULL, 0, 0 }
|
||||
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), -1, 0 }
|
||||
#endif
|
||||
|
||||
#define RW_LOCK_INITIALIZER(name) { name, NULL, -1, 0, 0, 0 }
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user