public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/7013] New: Policies permitted by pthread_attr_setschedpolicy() inconsistent with pthread_setschedparam()
@ 2008-11-06 16:19 mtk dot manpages at gmail dot com
2010-06-01 3:09 ` [Bug nptl/7013] " pasky at suse dot cz
0 siblings, 1 reply; 3+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-11-06 16:19 UTC (permalink / raw)
To: glibc-bugs
In nptl/pthread_attr_setschedpolicy.c there are the lines
/* Catch invalid values. */
if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR)
return EINVAL;
In pthread_setschedparam(), there is not an analogous check.
This means that one can set, for example, a SCHED_BATCH policy with
pthread_setschedparam(), but one can't initialize a thread attributes object
that can be used to create a thread running under the SCHED_BATCH policy.
This seems rather inconsistent. Either pthread_setschedparam() should place the
same restriction as pthread_attr_setschedpolicy(), or the restriction should be
removed from pthread_attr_setschedpolicy(). Given that the POSIX.1
specification of pthread_attr_setschedpolicy() says:
The supported values of policy shall include SCHED_FIFO,
SCHED_RR, and SCHED_OTHER, which are defined in the <sched.h>
header.
removing the restriction from pthread_attr_setschedpolicy() seems the more
reasonable course, so that applications can take advantage of the additional
scheduling policies provided by Linux.
--
Summary: Policies permitted by pthread_attr_setschedpolicy()
inconsistent with pthread_setschedparam()
Product: glibc
Version: 2.8
Status: NEW
Severity: normal
Priority: P2
Component: nptl
AssignedTo: drepper at redhat dot com
ReportedBy: mtk dot manpages at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=7013
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-01 5:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-7013-131@http.sourceware.org/bugzilla/>
2012-12-19 10:43 ` [Bug nptl/7013] Policies permitted by pthread_attr_setschedpolicy() inconsistent with pthread_setschedparam() schwab@linux-m68k.org
2014-07-01 5:35 ` fweimer at redhat dot com
2008-11-06 16:19 [Bug nptl/7013] New: " mtk dot manpages at gmail dot com
2010-06-01 3:09 ` [Bug nptl/7013] " pasky at suse dot cz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).