What is the basic difference between NPTL and POSIX threads? How have these two evolved?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
POSIX threads (pthread) is not an implementation, it is a API specification (a standard, on paper, in english) of several functions whose name starts with
pthread_and which are defined in<pthread.h>header. POSIX is also a set of specifications.NPTL is now inside GNU Libc on Linux and is (or at least tries very hard to be) an implementation of POSIX threads. It is a bunch of source and binary code on your Linux system.
An application compiled with
gcc -pthreadand linked with-pthreaduses NPTL code on Linux today.addenda
There exist alternative implementations of
pthread-s: on Linux, the MUSL Libc aims to be Posix compliant (which means having pthreads); on other Posix systems (AIX, Solaris, …) you also have pthreads (but they are not NPTL or Glibc).