summaryrefslogtreecommitdiff
path: root/sysdeps/generic/bits
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/bits')
-rw-r--r--sysdeps/generic/bits/mutex-attr.h5
-rw-r--r--sysdeps/generic/bits/mutex.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/generic/bits/mutex-attr.h b/sysdeps/generic/bits/mutex-attr.h
index 883b074..420d5d1 100644
--- a/sysdeps/generic/bits/mutex-attr.h
+++ b/sysdeps/generic/bits/mutex-attr.h
@@ -1,5 +1,5 @@
/* Mutex attribute type. Generic version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,4 +30,7 @@ struct __pthread_mutexattr
enum __pthread_mutex_type mutex_type;
};
+/* Attributes for a recursive mutex. */
+extern const struct __pthread_mutexattr __pthread_recursive_mutexattr;
+
#endif /* bits/mutex-attr.h */
diff --git a/sysdeps/generic/bits/mutex.h b/sysdeps/generic/bits/mutex.h
index 1aaf80e..e0ae3db 100644
--- a/sysdeps/generic/bits/mutex.h
+++ b/sysdeps/generic/bits/mutex.h
@@ -1,5 +1,5 @@
/* Mutex type. Generic version.
- Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,6 +54,10 @@ struct __pthread_mutex
# define __PTHREAD_MUTEX_INITIALIZER \
{ __SPIN_LOCK_INITIALIZER, __SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0, 0 }
+# define __PTHREAD_MUTEX_RECURSIVE_INITIALIZER \
+ { __SPIN_LOCK_INITIALIZER, __SPIN_LOCK_INITIALIZER, 0, 0, \
+ (struct __pthread_mutexattr *) &__pthread_recursive_mutexattr, 0, 0, 0 }
+
# endif
#endif /* Not __pthread_mutex_defined. */