1

I'm trying to write a program that uses read/write locks and would like to install the man pages for this type of lock.

I already have installed the packages

  • manpages-dev
  • man-db
  • glibc-doc

Could you please tell me the package that installs them or at least how to locate it?

Thank you very much in advance.

tigre200
  • 13
  • 2

1 Answers1

2

On Linux (two kinds of) locks are implemented in flock(2) and in fcntl(2).

As you already have installed manpages-dev both are available with man 2 flock and man 2 fcntl.

In case you are talking about POSIX threads locking (per the tag), POSIX additional manpages are available in manpages-posix-dev, in the non-free packages section, and thus appear to not be available through usual online Debian manpages links. From the package contents, this should be what you're looking for once installed:

pthread_rwlock_destroy.3posix
pthread_rwlock_rdlock.3posix
pthread_rwlock_timedrdlock.3posix
pthread_rwlock_timedwrlock.3posix
pthread_rwlock_tryrdlock.3posix
pthread_rwlock_trywrlock.3posix
pthread_rwlock_unlock.3posix
pthread_rwlock_wrlock.3posix
pthread_rwlockattr_destroy.3posix
pthread_rwlockattr_getpshared.3posix
pthread_rwlockattr_init.3posix
pthread_rwlockattr_setpshared.3posix
A.B
  • 31,762
  • 2
  • 62
  • 101
  • Thanks. In the package website it says to change /etc/apt/sources.list to get the packages from non-free and then I was able to install the manpages smoothly. It's just weird that these manpages are in the non-free. – tigre200 May 31 '20 at 12:32
  • The prolog to these manpages says to consult the corresponding Linux manpages, or they are not implemented in Linux. What are the Linux manpages or aren't these implemented in Linux? – tigre200 May 31 '20 at 12:38
  • It's a standard disclaimer boilerplate. On my Debian 10 system I have this in place for example `grep pthread_rwlock_rdlock /usr/include/pthreads.h` => `extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)`. Also `readelf -Ws /lib/x86_64-linux-gnu/libpthread.so.0 |grep pthread_rwlock_rdlock`'s output probably tells it exists "only" since glibc 2.2.5 released in 2002. – A.B May 31 '20 at 12:52
  • really. manpages such as `pthread_cancel` are available both in section 3posix and section 3, but other are not simply because they were never "translated", not because the feature doesn't exist. Beside I addressed your question as it was written – A.B May 31 '20 at 14:44