Use of the information contained in this unapproved document is at your own risk
.Last update: 30 March,1998
1003.1c-95 #44
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: Threads Options
Relevant Sections: 1.3.1.3, 2.9.3
Interpretation Request: (Defect Report)
-----------------------
From: Cheryl Huntington <clh@swdc.stratus.com>
What is the minimum functionality required to be conforming to the
POSIX specification ISO/IEC 9945-1,
ANSI/IEEE Std 1003.1 Second edition 1996-07-12. Unfortunately, it's not
clear to us what this is. The relevant sections in the specification are
1.3.1.3 and 2.9.3.
The POSIX spec lists in section 1.3.1.3, page 4, the symbolic constants
which define the implementation options required by conforming
implementations. Only these four symbols
are listed for threads:
_POSIX_THREADS Threads option (in 2.9.3)
_POSIX_THREAD_SAFE_FUNCTIONS Thread-Safe Functions option (in
2.9.3)
_POSIX_THREAD_PRIO_INHERIT Priority inheritance option (in
2.9.3)
_POSIX_THREAD_PRIORITY_SCHEDULING Thread Execution
Scheduling option (in 2.9.3)
It says that the remaining constants defined in sections 2.9.3 and 2.9.4
are useful for testing but are not required by a conforming
implementation. Functions which are not implemented must be callable
with the defined syntax, but can do nothing except return an error.
The following symbolic constants are not listed in section 1.3.1.3 or
2.9.3 as required, but are included in the list of options in table
2.10, page 54.
_POSIX_THREAD_ATTR_STACKADDR: thread stack address attribute
functions
_POSIX_THREAD_ATTR_STACKSIZE: thread stack size attribute
functions
_POSIX_THREAD_PRIO_PROTECT: thread priority protection functions
_POSIX_THREAD_PROCESS_SHARED: process shared synchronization
functions
I interpret this to mean we can exclude implementing the 12 functions
below (providing only a stub that returns the error ENOSYS) and still
have a conforming implementation.
_POSIX_THREAD_ATTR_STACKADDR
pthread_attr_getstackaddr()
pthread_attr_setstackaddr()
_POSIX_THREAD_ATTR_STACKSIZE
pthread_attr_getstacksize()
pthread_attr_setstacksize()
_POSIX_THREAD_PRIO_PROTECT
pthread_mutexattr_setprioceiling()
pthread_mutexattr_getprioceiling()
pthread_mutex_getprioceiling()
pthread_mutex_setprioceiling()
_POSIX_THREAD_PROCESS_SHARED
pthread_mutexattr_getpshared()
pthread_mutexattr_setpshared()
pthread_condattr_getpshared()
pthread_condattr_setpshared()
One point of confusion is the functions in the
_POSIX_THREAD_PRIORITY_SCHEDULING option. Section 1.3.1.3 indicates
these are required for a conforming implementation; however, each of the
functions is allowed to return the error ENOSYS if they are not
implemented (Section 13.5). All other functions which I've interpreted
as being required cannot return this error.
We would like to know the minimum set of options which are required for
a POSIX Threads implementation to be conforming.
Thank you for your time and consideration on this question.
Interpretation response
-----------------------
The interpretation request asks two questions. Responses are given for
each.
1) (first line) What is the minimum functionality required to be
conforming to IEEE 1003.1 1996:
The standard is clear on page 3 lines 67 to 81 that a 9945-1 1996
conforming implementation shall support all the non-optional interfaces.
2) (second from last line) What is the minimum set of options which are
required for POSIX Threads implementation to be conforming.
The standard is clear in defining a set of options in the area of
multithreading for implementations to possibly support. It does not
define the notion of a 9945-1 1996 'threads' conforming implementation
other than as the implementation choses to support one or more of the
thread option as required by conforming applications. Application
Environment Profiles (AEPs) are the vehicle for defining further
conformance sets required for specific applications.
Rationale
-------------
None.
Forwarded to Interpretations group: Feb 1 1997
Finalised: May 8th 1997