IEEE Standards Interpretation for IEEE Std 1003.1™-2001 IEEE Standard Standard for Information Technology -- Portable Operating System Interface (POSIX®)
Copyright © 2006 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Interpretation Request #64
Topic: sched.h, option shading. Relevant Sections: XBD sched.h Page: 1004 Line: 0 Section: pthread_attr_getschedparam
The pthread_attr_getschedparam() and pthread_attr_getschedparam() interfaces are part of the threads option. However, they take as an argument a pointer to a sched_param structure. This structure is declared in sched.h, which is dependent on the process scheduling option.
Below, [x› and ‹x] represent the opt-start and opt-end symbols.
The thread option needs to require the presence of sched.h:
Change the specification of sched.h from
sched.h - execution scheduling (REALTIME)
[PS] [x› #include ‹sched.h› ‹x]
sched.h - execution scheduling
[THR|PS] [x› #include ‹sched.h› ‹x]
Perhaps better, pthread_attr_getschedparam() and pthread_attr_setschedparam() should be part of an option that requires both threads and process scheduling, such as thread execution scheduling (of which pthread_setschedparam() and pthread_getschedparam() are part).
Change the specifications of pthread_attr_get/setschedparam from
pthread_attr_getschedparam, pthread_attr_setschedparam - get and set the schedparam attribute
[THR] [x> #include ‹pthread.h›
int pthread_attr_getschedparam(const pthread_attr_t *restrict attr, struct sched_param *restrict param); int pthread_attr_setschedparam(pthread_attr_t *restrict attr, const struct sched_param *restrict param); ‹x] to (something like)
pthread_attr_getschedparam, pthread_attr_setschedparam - get and set the schedparam attribute (REALTIME THREADS)
[THR TPS] [x> #include ‹pthread.h›
int pthread_attr_getschedparam(const pthread_attr_t *restrict attr,
struct sched_param *restrict param);
int pthread_attr_setschedparam(pthread_attr_t *restrict attr,
const struct sched_param *restrict param); ‹x]
Interpretation Response #64
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.
Rationale for Interpretation