* Added casts to the *_INITIALIZER macros, so that they can also be used in
a member constructor list. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33547 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008, Ingo Weinhold, [email protected].
|
* Copyright 2008, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2002-2008, Axel Dörfler, [email protected].
|
* Copyright 2002-2009, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
@@ -78,14 +78,16 @@ typedef struct rw_lock {
|
|||||||
|
|
||||||
// static initializers
|
// static initializers
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
# define MUTEX_INITIALIZER(name) { name, NULL, -1, 0 }
|
# define MUTEX_INITIALIZER(name) (mutex){ name, NULL, -1, 0 }
|
||||||
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), 0 }
|
# define RECURSIVE_LOCK_INITIALIZER(name) \
|
||||||
|
(recursive_lock){ MUTEX_INITIALIZER(name), 0 }
|
||||||
#else
|
#else
|
||||||
# define MUTEX_INITIALIZER(name) { name, NULL, 0, 0 }
|
# define MUTEX_INITIALIZER(name) (mutex){ name, NULL, 0, 0 }
|
||||||
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), -1, 0 }
|
# define RECURSIVE_LOCK_INITIALIZER(name) \
|
||||||
|
(recursive_lock){ MUTEX_INITIALIZER(name), -1, 0 }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RW_LOCK_INITIALIZER(name) { name, NULL, -1, 0, 0, 0 }
|
#define RW_LOCK_INITIALIZER(name) (rw_lock){ name, NULL, -1, 0, 0, 0 }
|
||||||
|
|
||||||
|
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user