diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-10-02 03:24:26 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-10-02 03:24:26 +0000 |
commit | bde7cb88e1541224eebdf2697d051304801b7d90 (patch) | |
tree | 0ef04e9ef450b1b183063c0a3669031af08ebcdf /lib | |
parent | b6f447b44cefaab49790b85869c019df88950311 (diff) | |
download | FreeBSD-src-bde7cb88e1541224eebdf2697d051304801b7d90.zip FreeBSD-src-bde7cb88e1541224eebdf2697d051304801b7d90.tar.gz |
Only generate code for _LCK_ASSERT if _LCK_DEBUG is defined.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkse/sys/lock.c | 7 | ||||
-rw-r--r-- | lib/libpthread/sys/lock.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/libkse/sys/lock.c b/lib/libkse/sys/lock.c index 9cae036..543487b 100644 --- a/lib/libkse/sys/lock.c +++ b/lib/libkse/sys/lock.c @@ -34,7 +34,12 @@ #include "atomic_ops.h" #include "lock.h" -#define LCK_ASSERT assert +#ifdef _LOCK_DEBUG +#define LCK_ASSERT(e) assert(e) +#else +#define LCK_ASSERT(e) +#endif + #define MAX_SPINS 500 void diff --git a/lib/libpthread/sys/lock.c b/lib/libpthread/sys/lock.c index 9cae036..543487b 100644 --- a/lib/libpthread/sys/lock.c +++ b/lib/libpthread/sys/lock.c @@ -34,7 +34,12 @@ #include "atomic_ops.h" #include "lock.h" -#define LCK_ASSERT assert +#ifdef _LOCK_DEBUG +#define LCK_ASSERT(e) assert(e) +#else +#define LCK_ASSERT(e) +#endif + #define MAX_SPINS 500 void |