summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-09-26 16:15:50 +0000
committerJeff Johnston <jjohnstn@redhat.com>2008-09-26 16:15:50 +0000
commit610eefefddbf3537694b9ee43296a576e5e11b72 (patch)
treed8e0a4d843a997f69750a103640d185b2da21a9e /newlib/libc/include/sys
parent3a3affe5f9e7b797d96778e9f367c94403a0a2d9 (diff)
downloadcygnal-610eefefddbf3537694b9ee43296a576e5e11b72.tar.gz
cygnal-610eefefddbf3537694b9ee43296a576e5e11b72.tar.bz2
cygnal-610eefefddbf3537694b9ee43296a576e5e11b72.zip
2008-09-25 Raphael Derossa Pereira <raphaelpereira@gmail.com>
* libc/include/pthread.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add new pthread_mutexattr_gettype and pthread_mutexattr_settype prototypes. * libc/include/sys/types.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add new mutex type values. (pthread_mutexattr_t)[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add type field.
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/types.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 1813bdda8..3f1893c20 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -323,6 +323,17 @@ typedef struct {
#define PTHREAD_PRIO_PROTECT 2
#endif
+#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
+
+/* Values for mutex type */
+
+#define PTHREAD_MUTEX_NORMAL 0
+#define PTHREAD_MUTEX_RECURSIVE 1
+#define PTHREAD_MUTEX_ERRORCHECK 2
+#define PTHREAD_MUTEX_DEFAULT 3
+
+#endif
+
typedef __uint32_t pthread_mutex_t; /* identify a mutex */
typedef struct {
@@ -334,6 +345,9 @@ typedef struct {
int prio_ceiling;
int protocol;
#endif
+#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
+ int type;
+#endif
int recursive;
} pthread_mutexattr_t;