This is the mail archive of the 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 linuxthreads/1826] New: thread creation attributes don't match documentation

1) The man pages for pthread_create() say that if you don't specify "attr", then
the default scheduler class is used. The man page for pthread_attr_init()
specifies that the default sched policy is SCHED_OTHER.

However, if you put the original thread into the SCHED_RR class and give it a
nonzero priority, then call pthread_create() with "attr" of NULL, the new thread
will end up with the same scheduler parameters as the thread that created it.
This violates the stated semantics.

2) The default attribute for the "inheritsched" attribute is supposed to be that
you do not inherit the scheduler parameters.  This would seem to imply that
ATTR_FLAG_NOTINHERITSCHED should be *set* by default. However, based on the code
pthread_attr_init() simply sets everything to zero, then sets the guardsize member.

This means that for me to specify scheduler attributes I have to explicitly call
pthread_attr_setinheritsched() with PTHREAD_EXPLICIT_SCHED even though it's
supposed to be the default.

           Summary: thread creation attributes don't match documentation
           Product: glibc
           Version: 2.3.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: linuxthreads
        AssignedTo: drow at false dot org
        ReportedBy: cfriesen at nortel dot com
                CC: glibc-bugs at sources dot redhat dot com

------- 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]