_____________________________________________________________________________ Notice: This is an unapproved draft interpretation. Use at your own risk. _____________________________________________________________________________ PASC Interpretation reference 1003.13-2003 #003 _____________________________________________________________________________ Interpretation Number: 003 Topic: Required Threads functions Relevant Sections: Table B-1, Table 1-1, Table 7-1/7-2 PASC Interpretation Request: ---------------------------- Reference: #3 From: Paul Chen Date: 2006 May 30 ------------------------------------------------------------------------ 7 Defect Report concerning (number and title of International Standard or DIS final text, if applicable): AEP:POSIX(R) Realtime and Embedded Application Support: IEEE Std 1003.13-2003 ------------------------------------------------------------------------ 8 Qualifier (e.g. error, omission, clarification required): 3 Error=1 , Omission=2, Clarification=3 ------------------------------------------------------------------------ 9 References in document (e.g. page, clause, figure, and/or table numbers): Table B-1, Table 1-1, Table 7-1/7-2 (for PSE52, e.g.) ------------------------------------------------------------------------ 10 Nature of defect (complete, concise explanation of the perceived problem): Table B-1, pg 116, indicates that when options _POSIX_THREADS and _POSIX_TIMEOUTS are included in a standard, then the following three APIs are included: pthread_mutex_timedlock() pthread_rwlock_timedrdlock() pthread_rwlock_timedwrlock() Each PSE5X definition (e.g., PSE52, as defined by Tables 7-1 and 7-2) does include option _POSIX_TIMEOUTS. Each PSE5X definition, however, does NOT include _POSIX_THREADS, but instead includes POSIX_THREADS_BASE, which is defined in Table 1-1 (pg 8) and which does NOT include any of the above three APIs (per footnote 6 on pg 10). Hence, it seems that a strict interpretation of the standard indicates that none of the above three APIs are included in any of the PSE5X standards. But in an email exchange with the 1003.13 Chair, he wrote that he thought the intent of the standard was that "timeouts are always required in practice. That said, we may have allowed but not required them in the smallest profiles. But there is no sin in providing them in all profiles." Joe suggested that I file this interpretation request. ------------------------------------------------------------------------ 11 Solution proposed by the submitter (optional): I would like clarification as to whether these APIs (and _POSIX_TIMEOUTS) were meant to be included in PSE5X. ------------------------------------------------------------------------ Interpretation: ---------------- The standard is clear in table 1-18 that POSIX_RW_LOCKS is not required in any of the PSE5x profiles, therefore the pthread_rwlock_timedrdlock() pthread_rwlock_timedwrlock() functions are not required. The standard is unclear on the issue of inclusion of pthread_mutex_timedlock(), and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: Following table 1-1 on page 10, note 6 says "POSIX_THREADS_BASE is the same as the _POSIX_THREADS option, but without the functions belonging to the POSIX_RW_LOCKS Unit of Functionality" which implies that if POSIX_THREADS_BASE and _POSIX_TIMEOUTS are required then pthread_mutex_timedlock() is required. However, the absence of pthread_mutex_timedlock() from table 1-1 implies that it is not required. Thus the standard is unclear. Notes to editors for a future revision (not part of the interpretation): ----------------------------------------------------------------------- pthread_mutex_timedlock() should be included in POSIX_THREADS_BASE in table 1-1 with a note (4) attached to it. During the review of #3 two editorials were noted that should be passed to IEEE staff editor as possible errata items. On page 8, in the POSIX_RW_LOCKS cell of Table 1-1, note "(d)" should be "(4)" and note "(e)" should be "(5)" Forwarded to interpretations group: 30 May 2006 Proposed resolution: 16 August 2006