about summary refs log tree commit diff
path: root/nptl/vars.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-06-15 12:24:15 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-06-15 12:24:15 +0530
commit61dd6208fb1e59a423b6dfa712a3c896c34b2590 (patch)
tree3417035a17046120bfedeafe2e7db9e366380101 /nptl/vars.c
parent601eb33debf0c7548f52ba72cec4b3f362105e39 (diff)
downloadglibc-61dd6208fb1e59a423b6dfa712a3c896c34b2590.tar.gz
glibc-61dd6208fb1e59a423b6dfa712a3c896c34b2590.tar.xz
glibc-61dd6208fb1e59a423b6dfa712a3c896c34b2590.zip
New API to set default thread attributes
This patch introduces two new convenience functions to set the default
thread attributes used for creating threads.  This allows a programmer
to set the default thread attributes just once in a process and then
run pthread_create without additional attributes.
Diffstat (limited to 'nptl/vars.c')
-rw-r--r--nptl/vars.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nptl/vars.c b/nptl/vars.c
index 45ca486143..3e2db42361 100644
--- a/nptl/vars.c
+++ b/nptl/vars.c
@@ -24,6 +24,9 @@
    provide any.  */
 struct pthread_attr __default_pthread_attr attribute_hidden;
 
+/* Mutex protecting __default_pthread_attr.  */
+int __default_pthread_attr_lock = LLL_LOCK_INITIALIZER;
+
 /* Flag whether the machine is SMP or not.  */
 int __is_smp attribute_hidden;