Bug 159024 - RPM expects PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
RPM expects PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-27 16:58 EDT by Mark Hatle
Modified: 2010-05-12 17:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-13 06:48:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Hatle 2005-05-27 16:58:52 EDT
Description of problem:
rpmsq.c uses mutexs to manage the child processes.  These mutexes are defined
using default parameters.  RPM expects that PTHREAD_MUTEX_DEFAULT will have the
effects of PTHREAD_MUTEX_NORMAL.  POSIX 1003.1-2004 states that
PTHREAD_MUTEX_DEFAULT may be set to any standard POSIX mutex type, not
necessarily NORMAL.  This can lead to many unexpected problems, especially when
porting RPM to new OSes.

Version-Release number of selected component (if applicable):
4.3+

Additional info:

My suggestion is to add a simple:

#if PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_NORMAL
  #error RPM Expected PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
#endif

to the rpmio/rpmsq.c to help prevent future porting issues.. or if the defaults
ever change in an existing port.
Comment 1 Jeff Johnson 2005-07-13 06:48:31 EDT
Added to rpm-4_4 cvs, should be in rpm-4.4.2-0.8 when built. Thanks for the suggestion.

Note You need to log in before you can comment on or make changes to this bug.