This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/10396] New: pthread_mutexattr_setprotocol() does not match posix standard


According to POSIX specification the pthread_mutexattr_setprotocol() function 
SHALL fail if:
ENOTSUP - the value specified by protocol is an unsupported value.

glibc/nptl implementation, which is clear seen from source files 
pthread_mutexattr_setprotocol.c and pthread_mutex_init.c (I've checked 2.7 and 
2.9-20090518), pthread_mutexattr_setprotocol() accepts unsupported value 
PTHREAD_PRIO_INHERIT, but on attempt to use such mutex attributes ENOTSUP is 
returned by pthread_mutex_init(), which should not return such error code.

This makes creating binaries, that should work on both realtime-enabled or not 
linuxes, problematic. Currently on linux I have to check for ENOTSUP from 
pthread_mutex_init(), recreate attributes avoiding call to 
pthread_mutexattr_setprotocol() and repeat pthread_mutex_init() once again.

-- 
           Summary: pthread_mutexattr_setprotocol() does not match posix
                    standard
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: peshkoff at mail dot ru
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10396

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]