about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-06-15 12:27:40 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-06-15 12:27:41 +0530
commitadf23d2cca20577946c8081c3fdc390f27703f33 (patch)
tree232a887a3437fc41d51a03dfb4992bc0e322477b
parent61dd6208fb1e59a423b6dfa712a3c896c34b2590 (diff)
downloadglibc-adf23d2cca20577946c8081c3fdc390f27703f33.tar.gz
glibc-adf23d2cca20577946c8081c3fdc390f27703f33.tar.xz
glibc-adf23d2cca20577946c8081c3fdc390f27703f33.zip
Add documentation for default pthread attribute functions
-rw-r--r--ChangeLog4
-rw-r--r--manual/threads.texi40
2 files changed, 44 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c2b2d3aa1a..a06d91f8f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+	* manual/threads.texi (Non-POSIX Extensions): New document
+	node.  Document pthread_getattr_default_np and
+	pthread_setattr_default_np.
+
 	* Versions.def (libpthread): Add GLIBC_2.18.
 	* sysdeps/unix/sysv/linux/i386/nptl/libpthread.abilist: Update.
 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libpthread.abilist:
diff --git a/manual/threads.texi b/manual/threads.texi
index 9a1df1a862..a23ac261ef 100644
--- a/manual/threads.texi
+++ b/manual/threads.texi
@@ -9,6 +9,8 @@ This chapter describes the @glibcadj{} POSIX Thread implementation.
 @menu
 * Thread-specific Data::          Support for creating and
 				  managing thread-specific data
+* Non-POSIX Extensions::          Additional functions to extend
+				  POSIX Thread functionality
 @end menu
 
 @node Thread-specific Data
@@ -42,3 +44,41 @@ thread.
 Associate the thread-specific @var{value} with @var{key} in the calling thread.
 
 @end table
+
+@node Non-POSIX Extensions
+@section Non-POSIX Extensions
+
+In addition to implementing the POSIX API for threads, @theglibc{} provides
+additional functions and interfaces to provide functionality not specified in
+the standard.
+
+@menu
+* Default Thread Attributes::             Setting default attributes for
+					  threads in a process.
+@end menu
+
+@node Default Thread Attributes
+@subsection Setting Process-wide defaults for thread attributes
+
+@Theglibc{} provides non-standard API functions to set and get the default
+attributes used in the creation of threads in a process.
+
+@deftypefun int pthread_getattr_default_np (pthread_attr_t *@var{attr})
+Get the default attribute values and set @var{attr} to match.  This
+function returns @math{0} on success and a non-zero error code on
+failure.
+@end deftypefun
+
+@deftypefun int pthread_getattr_default_np (pthread_attr_t *@var{attr})
+Set the default attribute values to match the values in @var{attr}.  The
+function returns @math{0} on success and a non-zero error code on failure.
+The following error codes are defined for this function:
+
+@table @code
+@item EINVAL
+At least one of the values in @var{attr} does not qualify as valid for the
+attributes or the stack address is set in the attribute.
+@item ENOMEM
+The system does not have sufficient memory.
+@end table
+@end deftypefun