# phpman > man > nptl(7)

[NPTL(7)](https://www.chedong.com/phpMan.php/man/NPTL/7/markdown)                               Linux Programmer's Manual                              [NPTL(7)](https://www.chedong.com/phpMan.php/man/NPTL/7/markdown)



## NAME
       nptl - Native POSIX Threads Library

## DESCRIPTION
       NPTL (Native POSIX Threads Library) is the GNU C library POSIX threads implementation that is
       used on modern Linux systems.

### NPTL and signals
       NPTL makes internal use of the first two real-time signals (signal numbers 32 and  33).   One
       of  these  signals  is  used  to support thread cancellation and POSIX timers (see **timer**___**cre**‐‐
       [**ate**(2)](https://www.chedong.com/phpMan.php/man/ate/2/markdown)); the other is used as part of a mechanism that ensures all threads in a  process  al‐
       ways  have the same UIDs and GIDs, as required by POSIX.  These signals cannot be used in ap‐
       plications.

       To prevent accidental use of these signals in applications, which might  interfere  with  the
       operation of the NPTL implementation, various glibc library functions and system call wrapper
       functions attempt to hide these signals from applications, as follows:

       *  **SIGRTMIN** is defined with the value 34 (rather than 32).

       *  The [**sigwaitinfo**(2)](https://www.chedong.com/phpMan.php/man/sigwaitinfo/2/markdown), [**sigtimedwait**(2)](https://www.chedong.com/phpMan.php/man/sigtimedwait/2/markdown), and [**sigwait**(3)](https://www.chedong.com/phpMan.php/man/sigwait/3/markdown) interfaces silently ignore requests to
          wait  for  these  two  signals  if  they are specified in the signal set argument of these
          calls.

       *  The [**sigprocmask**(2)](https://www.chedong.com/phpMan.php/man/sigprocmask/2/markdown) and **pthread**___**[sigmask**(3)](https://www.chedong.com/phpMan.php/man/sigmask/3/markdown) interfaces silently  ignore  attempts  to  block
          these two signals.

       *  The  [**sigaction**(2)](https://www.chedong.com/phpMan.php/man/sigaction/2/markdown), **pthread**___**[kill**(3)](https://www.chedong.com/phpMan.php/man/kill/3/markdown), and **pthread**___**[sigqueue**(3)](https://www.chedong.com/phpMan.php/man/sigqueue/3/markdown) interfaces fail with the error
          **EINVAL** (indicating an invalid signal number) if these signals are specified.

       *  [**sigfillset**(3)](https://www.chedong.com/phpMan.php/man/sigfillset/3/markdown) does not include these two signals when it creates a full signal set.

### NPTL and process credential changes
       At the Linux kernel level, credentials (user and group IDs) are a per-thread attribute.  How‐
       ever,  POSIX  requires  that all of the POSIX threads in a process have the same credentials.
       To accommodate this requirement, the NPTL implementation wraps all of the system  calls  that
       change process credentials with functions that, in addition to invoking the underlying system
       call, arrange for all other threads in the process to also change their credentials.

       The implementation of each of these system calls involves the use of a real-time signal  that
       is sent (using [**tgkill**(2)](https://www.chedong.com/phpMan.php/man/tgkill/2/markdown)) to each of the other threads that must change its credentials.  Be‐
       fore sending these signals, the thread that is changing credentials  saves  the  new  creden‐
       tial(s)  and  records the system call being employed in a global buffer.  A signal handler in
       the receiving thread(s) fetches this information and then uses the same system call to change
       its credentials.

       Wrapper functions employing this technique are provided for [**setgid**(2)](https://www.chedong.com/phpMan.php/man/setgid/2/markdown), [**setuid**(2)](https://www.chedong.com/phpMan.php/man/setuid/2/markdown), [**setegid**(2)](https://www.chedong.com/phpMan.php/man/setegid/2/markdown),
       [**seteuid**(2)](https://www.chedong.com/phpMan.php/man/seteuid/2/markdown), [**setregid**(2)](https://www.chedong.com/phpMan.php/man/setregid/2/markdown), [**setreuid**(2)](https://www.chedong.com/phpMan.php/man/setreuid/2/markdown), [**setresgid**(2)](https://www.chedong.com/phpMan.php/man/setresgid/2/markdown), [**setresuid**(2)](https://www.chedong.com/phpMan.php/man/setresuid/2/markdown), and [**setgroups**(2)](https://www.chedong.com/phpMan.php/man/setgroups/2/markdown).

## CONFORMING TO
       For details of the conformance of NPTL to the POSIX standard, see [**pthreads**(7)](https://www.chedong.com/phpMan.php/man/pthreads/7/markdown).

## NOTES
       POSIX says that any thread in any process with access to the  memory  containing  a  process-
       shared (**PTHREAD**___**PROCESS**___**SHARED**) mutex can operate on that mutex.  However, on 64-bit x86 sys‐
       tems, the mutex definition for x86-64 is incompatible with the  mutex  definition  for  i386,
       meaning that 32-bit and 64-bit binaries can't share mutexes on x86-64 systems.

## SEE ALSO
       [**credentials**(7)](https://www.chedong.com/phpMan.php/man/credentials/7/markdown), [**pthreads**(7)](https://www.chedong.com/phpMan.php/man/pthreads/7/markdown), [**signal**(7)](https://www.chedong.com/phpMan.php/man/signal/7/markdown), [**standards**(7)](https://www.chedong.com/phpMan.php/man/standards/7/markdown)

## COLOPHON
       This  page  is  part  of  release  5.10 of the Linux _man-pages_ project.  A description of the
       project, information about reporting bugs, and the latest version of this page, can be  found
       at <https://www.kernel.org/doc/man-pages/>.



Linux                                        2015-08-08                                      [NPTL(7)](https://www.chedong.com/phpMan.php/man/NPTL/7/markdown)
