Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102616227
D40900.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40900.diff
View Options
diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile
--- a/lib/libthr/Makefile
+++ b/lib/libthr/Makefile
@@ -51,8 +51,10 @@
MAN= libthr.3
+.if ${MK_PTHREADS_ASSERTIONS} != "no"
# enable extra internal consistency checks
CFLAGS+=-D_PTHREADS_INVARIANTS
+.endif
PRECIOUSLIB=
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -120,7 +120,7 @@
__weak_reference(_pthread_mutex_isowned_np, pthread_mutex_isowned_np);
static void
-mutex_init_link(struct pthread_mutex *m)
+mutex_init_link(struct pthread_mutex *m __unused)
{
#if defined(_PTHREADS_INVARIANTS)
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -159,6 +159,7 @@
PKGBOOTSTRAP \
PMC \
PPP \
+ PTHREADS_ASSERTIONS \
QUOTAS \
RADIUS_SUPPORT \
RBOOTD \
diff --git a/tools/build/options/WITHOUT_PTHREADS_ASSERTIONS b/tools/build/options/WITHOUT_PTHREADS_ASSERTIONS
new file mode 100644
--- /dev/null
+++ b/tools/build/options/WITHOUT_PTHREADS_ASSERTIONS
@@ -0,0 +1 @@
+Disable debugging assertions in pthreads library.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 8:46 PM (20 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14647652
Default Alt Text
D40900.diff (1 KB)
Attached To
Mode
D40900: Fix to allow building libthr without -D_PTHREADS_INVARIANTS defined
Attached
Detach File
Event Timeline
Log In to Comment