This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Document GLIBC_PTHREAD_DEFAULT_STACKSIZE environment variable


Hi,

This patch adds documentation for GLIBC_PTHREAD_DEFAULT_STACKSIZE in
the glibc manual.  It assumes that the nptl chapter has been created
by my earlier thread_local manual patch[1], so that will need to go in
before this one.

Siddhesh

[1] http://sourceware.org/ml/libc-alpha/2013-02/msg00446.html

	* manual/nptl.texi (POSIX Threads): New node on Non-POSIX
	Extensions.

diff --git a/manual/nptl.texi b/manual/nptl.texi
index c727870..150c23c 100644
--- a/manual/nptl.texi
+++ b/manual/nptl.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
@@ -44,3 +46,29 @@ Set @var{value} as the thread-specific data to be referred by @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
+* Thread Stack Size::             Setting default stack size
+@end menu
+
+@node Thread Stack Size
+@subsection Setting Process-wide defaults for thread stack size
+
+The POSIX Thread implementation in @theglibc{} allows a developer to specify
+the stack size for threads it creates by creating an @code{pthread_attr_t}
+type with the stack size defined and then using that for each pthread_create
+call.  There is however no way in the standard to do this at an administrative
+level either by using a configuration file or an environment variable.  In
+@theglibc{} this is possible by exporting an environment variable
+@code{GLIBC_PTHREAD_DEFAULT_STACKSIZE} in the environment of the process.
+The stack size all threads spawned by the program (except the main thread) to
+have this size, adjusted upwards for internal data structures and alignment.
+If the size is less than @code{PTHREAD_STACK_MIN}, then it is ignored and the
+minimum stack size is used.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]