public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mtk dot manpages at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug nptl/7013] New: Policies permitted by pthread_attr_setschedpolicy() inconsistent with pthread_setschedparam() Date: Thu, 06 Nov 2008 16:19:00 -0000 [thread overview] Message-ID: <20081106161830.7013.mtk.manpages@gmail.com> (raw) 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.
next reply other threads:[~2008-11-06 16:19 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-06 16:19 mtk dot manpages at gmail dot com [this message] 2010-06-01 3:09 ` [Bug nptl/7013] " pasky at suse dot cz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081106161830.7013.mtk.manpages@gmail.com \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).