33

I can't find the manual for pthread_mutex_lock with man pthread_mutex_lock, is that something wrong with manpages-dev ? I got that package installed, but missing some manual.

Should I fire a bug to Ubuntu ?

ish
  • 139,926
daisy
  • 6,582

6 Answers6

31

The documentation for pthreads is in the glibc-doc package.

Jeremy Kerr
  • 27,199
  • 2
    Note that (as of 19.04 Disco Dingo) glibc-doc includes the Linux-specific man pages for pthreads, whereas the manpages-posix-dev package has the POSIX pthreads man pages – villapx Aug 06 '19 at 15:20
  • @villapx Do you have an idea why some of the Linux-specific man pages for pthread, that is the one including implementation concerns of the pthread API, still refer to LinuxThreads and not NTPL as can be seen for example here http://manpages.ubuntu.com/manpages/eoan/man3/pthread_cond_wait.3.html ? – Manuel Selva Nov 18 '19 at 15:18
  • @ManuelSelva Great question, I'm not sure. I'm doing some digging at the moment to try and find out why. It doesn't look like the NPTL implementation is descended from LinuxThreads (looking at Wikipedia. etc.), but maybe they did inherit some of the man pages because they were well written? – villapx Nov 18 '19 at 16:50
  • 1
    @villapx maybe yes teh writing style is a motivation. I'll probably ask a separate question, but int the cas of cond_wait this makes a big difference since the glibc-doc does not mention spurious wake-up at all. – Manuel Selva Nov 18 '19 at 19:52
14

Ubuntu (and Debian) include the desired man pages in the manpages-posix-dev package.

chaskes
  • 15,246
1

Just install the glibc-doc package, the missing man pages will be there:

sudo apt install glibc-doc
  • How is this different from the accepted answer posted in July 2012? – matigo Jun 14 '21 at 14:46
  • I actually thought he was just linking to the site of the package. So I thought it better to add the script to install it. But now I clicked on the link and discovered it was a script for installing the package, and not a link to site. So you are correct, apparently it's not different. – user3499516 Jun 15 '21 at 16:36
1

Just for completeness, here a version we can enjoy in our web-browser:

http://manpages.ubuntu.com/manpages/wily/man3/pthread_mutex_lock.3.html

I know, links might get outdated, but if we feed our search-engine we will get a lot of alternative links which deliver the desired information.

Advantage: Better readability, comfortability with use in GUI. We don't need to install anything.

Disadvantage: Requires Internet connection (at least for the time we need to download the site).

mook765
  • 15,925
0

Try

sudo apt-get install manpages-posix-dev 
man pthread_mutex_lock(/unlock/destroy/...)

You can see the result ... thank you

0

For KDE Neon, I was able to find everything with:

sudo apt-get install manpages-posix manpages-posix-dev
sudo apt-get install glibc-doc

I needed the second to find things like man pthread_mutex_unlock