summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/pthread_private.h
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2004-02-01 06:22:14 +0000
committerbrad <brad@openbsd.org>2004-02-01 06:22:14 +0000
commit2f92584562164a6ffb517201f142379c52dbb6a3 (patch)
tree53bb785bc57b6db3feee1352c3934992cb6b92fa /lib/libpthread/uthread/pthread_private.h
parent- remove sun3 (diff)
downloadwireguard-openbsd-2f92584562164a6ffb517201f142379c52dbb6a3.tar.xz
wireguard-openbsd-2f92584562164a6ffb517201f142379c52dbb6a3.zip
Add a simple work-around for deadlocking on recursive
readlocks on a rwlock while there are writers waiting. From: FreeBSD's libc_r ok marc@
Diffstat (limited to 'lib/libpthread/uthread/pthread_private.h')
-rw-r--r--lib/libpthread/uthread/pthread_private.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h
index 42ad837b4ee..afafee5e642 100644
--- a/lib/libpthread/uthread/pthread_private.h
+++ b/lib/libpthread/uthread/pthread_private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread_private.h,v 1.51 2004/01/15 22:22:11 marc Exp $ */
+/* $OpenBSD: pthread_private.h,v 1.52 2004/02/01 06:22:14 brad Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -765,6 +765,9 @@ struct pthread {
/* Number of priority ceiling or protection mutexes owned. */
int priority_mutex_count;
+ /* Number rwlocks rdlocks held. */
+ int rdlock_count;
+
/*
* Queue of currently owned mutexes.
*/