summaryrefslogtreecommitdiff
path: root/libc/manual
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-03-18 16:44:23 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-03-18 16:44:23 +0000
commit8751114637bcc3caaf16a4216da0afb84456558a (patch)
treef3eca66b88003bc49c309a95827d461ae5b66aed /libc/manual
parentb261131fe2b94b53fe4950d9265ae10bef228455 (diff)
Merge changes between r22552 and r22663 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@22664 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/manual')
-rw-r--r--libc/manual/Makefile2
-rw-r--r--libc/manual/debug.texi2
-rw-r--r--libc/manual/install.texi8
-rw-r--r--libc/manual/memory.texi32
-rw-r--r--libc/manual/nptl.texi44
5 files changed, 69 insertions, 19 deletions
diff --git a/libc/manual/Makefile b/libc/manual/Makefile
index c1a304cc8..10314a962 100644
--- a/libc/manual/Makefile
+++ b/libc/manual/Makefile
@@ -42,7 +42,7 @@ chapters = $(addsuffix .texi, \
message search pattern io stdio llio filesys \
pipe socket terminal syslog math arith time \
resource setjmp signal startup process job nss \
- users sysinfo conf crypt debug)
+ users sysinfo conf crypt debug nptl)
add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi))
appendices = lang.texi header.texi install.texi maint.texi platform.texi \
contrib.texi
diff --git a/libc/manual/debug.texi b/libc/manual/debug.texi
index b2bcb31a1..1db9c180f 100644
--- a/libc/manual/debug.texi
+++ b/libc/manual/debug.texi
@@ -1,5 +1,5 @@
@node Debugging Support
-@c @node Debugging Support, , Cryptographic Functions, Top
+@c @node Debugging Support, POSIX Threads, Cryptographic Functions, Top
@c %MENU% Functions to help debugging applications
@chapter Debugging support
diff --git a/libc/manual/install.texi b/libc/manual/install.texi
index e36fb052a..e6c1bafe6 100644
--- a/libc/manual/install.texi
+++ b/libc/manual/install.texi
@@ -172,10 +172,10 @@ the compiler and/or binutils.
If you only specify @samp{--host}, @code{configure} will prepare for a
native compile but use what you specify instead of guessing what your
system is. This is most useful to change the CPU submodel. For example,
-if @code{configure} guesses your machine as @code{i586-pc-linux-gnu} but
-you want to compile a library for 386es, give
-@samp{--host=i386-pc-linux-gnu} or just @samp{--host=i386-linux} and add
-the appropriate compiler flags (@samp{-mcpu=i386} will do the trick) to
+if @code{configure} guesses your machine as @code{i686-pc-linux-gnu} but
+you want to compile a library for 586es, give
+@samp{--host=i586-pc-linux-gnu} or just @samp{--host=i586-linux} and add
+the appropriate compiler flags (@samp{-mcpu=i586} will do the trick) to
@var{CFLAGS}.
If you specify just @samp{--build}, @code{configure} will get confused.
diff --git a/libc/manual/memory.texi b/libc/manual/memory.texi
index 5b14aa69b..0c3d39efa 100644
--- a/libc/manual/memory.texi
+++ b/libc/manual/memory.texi
@@ -683,25 +683,21 @@ parameter to be set, and @var{value} the new value to be set. Possible
choices for @var{param}, as defined in @file{malloc.h}, are:
@table @code
-@item M_TRIM_THRESHOLD
-This is the minimum size (in bytes) of the top-most, releasable chunk
-that will cause @code{sbrk} to be called with a negative argument in
-order to return memory to the system.
-@item M_TOP_PAD
-This parameter determines the amount of extra memory to obtain from the
-system when a call to @code{sbrk} is required. It also specifies the
-number of bytes to retain when shrinking the heap by calling @code{sbrk}
-with a negative argument. This provides the necessary hysteresis in
-heap size such that excessive amounts of system calls can be avoided.
+@comment TODO: @item M_ARENA_MAX
+@comment - Document ARENA_MAX env var.
+@comment TODO: @item M_ARENA_TEST
+@comment - Document ARENA_TEST env var.
+@comment TODO: @item M_CHECK_ACTION
+@item M_MMAP_MAX
+The maximum number of chunks to allocate with @code{mmap}. Setting this
+to zero disables all use of @code{mmap}.
@item M_MMAP_THRESHOLD
All chunks larger than this value are allocated outside the normal
heap, using the @code{mmap} system call. This way it is guaranteed
that the memory for these chunks can be returned to the system on
@code{free}. Note that requests smaller than this threshold might still
be allocated via @code{mmap}.
-@item M_MMAP_MAX
-The maximum number of chunks to allocate with @code{mmap}. Setting this
-to zero disables all use of @code{mmap}.
+@comment TODO: @item M_MXFAST
@item M_PERTURB
If non-zero, memory blocks are filled with values depending on some
low order bits of this parameter when they are allocated (except when
@@ -710,6 +706,16 @@ use of uninitialized or freed heap memory. Note that this option does not
guarantee that the freed block will have any specific values. It only
guarantees that the content the block had before it was freed will be
overwritten.
+@item M_TOP_PAD
+This parameter determines the amount of extra memory to obtain from the
+system when a call to @code{sbrk} is required. It also specifies the
+number of bytes to retain when shrinking the heap by calling @code{sbrk}
+with a negative argument. This provides the necessary hysteresis in
+heap size such that excessive amounts of system calls can be avoided.
+@item M_TRIM_THRESHOLD
+This is the minimum size (in bytes) of the top-most, releasable chunk
+that will cause @code{sbrk} to be called with a negative argument in
+order to return memory to the system.
@end table
@end deftypefun
diff --git a/libc/manual/nptl.texi b/libc/manual/nptl.texi
new file mode 100644
index 000000000..9a1df1a86
--- /dev/null
+++ b/libc/manual/nptl.texi
@@ -0,0 +1,44 @@
+@node POSIX Threads
+@c @node POSIX Threads, , Cryptographic Functions, Top
+@chapter POSIX Threads
+@c %MENU% POSIX Threads
+@cindex pthreads
+
+This chapter describes the @glibcadj{} POSIX Thread implementation.
+
+@menu
+* Thread-specific Data:: Support for creating and
+ managing thread-specific data
+@end menu
+
+@node Thread-specific Data
+@section Thread-specific Data
+
+The @glibcadj{} implements functions to allow users to create and manage
+data specific to a thread. Such data may be destroyed at thread exit,
+if a destructor is provided. The following functions are defined:
+
+@table @code
+
+@item int pthread_key_create (pthread_key_t *@var{key}, void (*@var{destructor})(void*))
+Create a thread-specific data key for the calling thread, referenced by
+@var{key}.
+
+Objects declared with the C++11 @code{thread_local} keyword are destroyed
+before thread-specific data, so they should not be used in thread-specific
+data destructors or even as members of the thread-specific data, since the
+latter is passed as an argument to the destructor function.
+
+@item int pthread_key_delete (pthread_key_t @var{key})
+Destroy the thread-specific data @var{key} in the calling thread. The
+destructor for the thread-specific data is not called during destruction, nor
+is it called during thread exit.
+
+@item void *pthread_getspecific (pthread_key_t @var{key})
+Return the thread-specific data associated with @var{key} in the calling
+thread.
+
+@item int pthread_setspecific (pthread_key_t @var{key}, const void *@var{value})
+Associate the thread-specific @var{value} with @var{key} in the calling thread.
+
+@end table