summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-10-02 03:24:26 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-10-02 03:24:26 +0000
commitbde7cb88e1541224eebdf2697d051304801b7d90 (patch)
tree0ef04e9ef450b1b183063c0a3669031af08ebcdf /lib
parentb6f447b44cefaab49790b85869c019df88950311 (diff)
downloadFreeBSD-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.c7
-rw-r--r--lib/libpthread/sys/lock.c7
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
OpenPOWER on IntegriCloud