I am trying to find the source code of pthread library. (I guess its a supposed to be a part of Linux source code)
But somehow can't find any good website that has it.
I like this website: http://lxr.linux.no/#linux+v2.6.34.1/ where I usually find what I need. Somehow pthread source is not searchable. Anyway, I wanted to mention that I need a link to a browsable (and searchable) website like that one.
Websites for browsing linux source can be a matter of personal taste. So all links to the pthread source are welcome.
Most probably I will end up bookmarking all of them, look thru them, and then accept the best answer.
There are a number of ways to find this out. Simply type find / -name 'libpthread.so' -print to find the file named libpthread.so on your system. You can check the library locations your dynamic linker ld checks in for libraries, which are listed in /etc/ld.
The recent 2.34 release of the GNU C library, glibc, removes libpthread as a separate library. This article explains the motivation behind this change and some consequences for developers and system administrators.
Yes, the pthreads library is still used for threading. There are some higher level libraries (boost, or if you have a c++ 11 compliant compiler, the standard library) that will also give you threading capabilities, although for somethings you will still need to fall back to the plain pthread call.
For NuGet packages, please launch Visual Studio 2017 and select your project > right-click your project > choose Manage NuGet Packages… > Browse > search and find pthreads > Install.
pthreads are implemented on Linux in libc
. The usual libc is glibc
- the glibc pthreads implementation is called NPTL, and the source is available in gitweb.
You can find the source at both of these links:
http://www.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html
http://code.google.com/p/pthread-lib/source/browse/trunk/pthread-lib/src/ptl_array_list.c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With