Email List: Xaustin-review-lX
[All Lists]

Re: Defect in XSH pthread_attr_getinheritsched()

To: yyyyyyy@xxxxxxxxxx
Subject: Re: Defect in XSH pthread_attr_getinheritsched()
From: Dave Butenhof <yyyyyyyyyyyyyy@xxxxxx>
Date: Thu, 13 Feb 2003 06:36:05 -0500
Cc: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Organization: Hewlett-Packard Company
References: <200302130812.IAA11556@xxxxxx>
yyyyyyy@xxxxxxxxxx wrote:

	Defect report from : Ulrich Drepper , Red Hat

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 985 line 31346 section pthread_attr_getinheritsched() objection {ptattr-1}

Problem:

Defect code :  2. Omission

The standard does not mention anywhere the default value of the value retrieved via pthread_attr_getinheritsched() after a call to
pthread_attr_init().

The pthread_attr_getguardsize() man page does contain the appropriate information.

I would guess the default value is PTHREAD_INHERIT_SCHED but I'm not sure at all.

Action:

Add new paragraph after line 31245.  Add either

 The default value of the /inheritsched/ attribute is <t>PTHREAD_INHERIT_SCHED<t>


or add

 The default value of the /inheritsched/ attribute is
<t>PTHREAD_EXPLICIT_SCHED<t>

While we could decide to change that, this is NOT a defect. The working group INTENDED that the defaults for some attributes (including all the scheduling attributes) be IMPLEMENTATION DEFINED. This was to allow support for the expected range of implementations, from embedded realtime systems to multiuser timeshare systems; no one set of defaults could be appropriate for all.

This should probably be pointed out on each of the attributes functions, but isn't. You will find a general reference on page 52 under "Thread Scheduling"... "The default values of other scheduling attributes are implementation defined."

So the Action here should be to add explicit notice to each of the scheduling attribute functions that "The default value of xxx attribute is implementation defined."

--
/--------------------[ yyyyyyyyyyyyyy@xxxxxx ]--------------------\
| Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect |
| My book: http://www.awl.com/cseng/titles/0-201-63392-2/ |
\----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/


<Prev in Thread] Current Thread [Next in Thread>