* 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:
Axel Dörfler 2009-10-12 14:27:02 +00:00
parent fd111c8162
commit 4baa865937

View File

@ -1,6 +1,6 @@
/*
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2002-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
@ -78,14 +78,16 @@ typedef struct rw_lock {
// static initializers
#if KDEBUG
# define MUTEX_INITIALIZER(name) { name, NULL, -1, 0 }
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), 0 }
# define MUTEX_INITIALIZER(name) (mutex){ name, NULL, -1, 0 }
# define RECURSIVE_LOCK_INITIALIZER(name) \
(recursive_lock){ MUTEX_INITIALIZER(name), 0 }
#else
# define MUTEX_INITIALIZER(name) { name, NULL, 0, 0 }
# define RECURSIVE_LOCK_INITIALIZER(name) { MUTEX_INITIALIZER(name), -1, 0 }
# define MUTEX_INITIALIZER(name) (mutex){ name, NULL, 0, 0 }
# define RECURSIVE_LOCK_INITIALIZER(name) \
(recursive_lock){ MUTEX_INITIALIZER(name), -1, 0 }
#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