[Bug linuxthreads/1826] New: thread creation attributes don't match documentation
cfriesen at nortel dot com
sourceware-bugzilla@sourceware.org
Mon Nov 7 16:13:00 GMT 2005
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
http://sourceware.org/bugzilla/show_bug.cgi?id=1826
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Glibc-bugs
mailing list