From 61dd6208fb1e59a423b6dfa712a3c896c34b2590 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Sat, 15 Jun 2013 12:24:15 +0530 Subject: 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. --- nptl/vars.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nptl/vars.c') diff --git a/nptl/vars.c b/nptl/vars.c index 45ca486..3e2db42 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; -- cgit v1.1