summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-03-19 21:19:00 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-03-19 21:19:00 +0000
commit9abab06d318f6fc4ba2ddf1b70766fa48de4fe44 (patch)
treedd8cbbb0baa295a888d5ead4db798785d7cf26a1 /lib
parent7ceec71be58feba1bba911f3f74174ee5dddcced (diff)
Provide #defines for the mutex types as required by POSIX. Pointed out by
guenther@ and found out the hard way by landry@ ok guenther@
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/include/pthread.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/libpthread/include/pthread.h b/lib/libpthread/include/pthread.h
index 7329429d750..ba6bda588cf 100644
--- a/lib/libpthread/include/pthread.h
+++ b/lib/libpthread/include/pthread.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread.h,v 1.40 2013/06/17 19:11:54 guenther Exp $ */
+/* $OpenBSD: pthread.h,v 1.41 2015/03/19 21:18:59 kettenis Exp $ */
/*
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
@@ -163,14 +163,7 @@ struct pthread_once {
#define PTHREAD_PRIO_PROTECT 2
/*
- * Mutex types (Single UNIX Specification, Version 2, 1997).
- *
- * Note that a mutex attribute with one of the following types:
- *
- * PTHREAD_MUTEX_NORMAL
- * PTHREAD_MUTEX_RECURSIVE
- *
- * will deviate from POSIX specified semantics.
+ * Mutex types.
*/
enum pthread_mutextype {
PTHREAD_MUTEX_ERRORCHECK = 1, /* Error checking mutex */
@@ -180,6 +173,10 @@ enum pthread_mutextype {
PTHREAD_MUTEX_TYPE_MAX
};
+#define PTHREAD_MUTEX_ERRORCHECK PTHREAD_MUTEX_ERRORCHECK
+#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE
+#define PTHREAD_MUTEX_NORMAL PTHREAD_MUTEX_NORMAL
+#define PTHREAD_MUTEX_STRICT_NP PTHREAD_MUTEX_STRICT_NP
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_STRICT_NP
/*