about summary refs log tree commit diff
path: root/nptl/sysdeps/pthread
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/sysdeps/pthread
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/sysdeps/pthread')
-rw-r--r--nptl/sysdeps/pthread/pthread.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index 10bcb806b3..ded5ae59ff 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -404,6 +404,14 @@ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
 					cpu_set_t *__cpuset)
      __THROW __nonnull ((1, 3));
 
+/* Get the default attributes used by pthread_create in this process.  */
+extern int pthread_getattr_default_np (pthread_attr_t *__attr)
+     __THROW __nonnull ((1));
+
+/* Set the default attributes to be used by pthread_create in this
+   process.  */
+extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Initialize thread attribute *ATTR with attributes corresponding to the
    already running thread TH.  It shall be called on uninitialized ATTR