lsb

pthread_rwlockattr_setkind_np incomplete, has impacts

Bug #1327304 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb
In Progress
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

There are problems with pthread_rwlockattr_setkind_np.

First, the manpage refers to three possible settings, but these settings are
absent from the LSB Data Definitions, and thus from the SDK headers, rendering
the function useless. From upstream pthread.h:

enum
{
  PTHREAD_RWLOCK_PREFER_READER_NP,
  PTHREAD_RWLOCK_PREFER_WRITER_NP,
  PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
  PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
};

Second, the LSB manpage (which was also submitted to the Linux Manpages project
in 2010, although I don't see the page even in recent releases, or in the git
tree at git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git) fails to
define all three types - there is no description of the behavior of
PTHREAD_RWLOCK_PREFER_WRITER_NP.

Third, since the behavior of thread read-write locks is changed by manipulating
the attributes object in this way, the POSIX description of the behavior of
read-write locks, which is referenced directly by LSB through the various
pages, is no longer completely accurate, and LSB should have a delta manpage
indicating the difference. I have not looked at all of the pages, but
certainly the combined pthread_rwlock_rdlock, pthread_rwlock_tryrdlock page
should have a note on the impact of changing this "kind" attribute. Indeed,
the Linux manpages should reflect this difference as well - and as far as I can
see the entire read-write lock set is only documented by way of imported POSIX
pages.

Tags: sdk uplift zclose
Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
Jeff Johnson (n3npq)
tags: added: zclose
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.