Answering questions that may arise related to the meaning of portions of an IEEE standard concerning specific applications.

IEEE Standards Interpretations for IEEE Std 1003.1b™-1993 IEEE Standard for Information Technology - Portable Operating System Interfaces (POSIX(R)) - Part 1: System Application Program Interface (API) - Amendment 1: Realtime Extension [C language]

Copyright © 1996 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 #6
Topic: semaphores Relevant Sections:, page 222, lines 110-118

What are the meanings of read and write permissions with respect to semaphores? Is there a method of opening an existing semaphore for O_RDONLY or O_RDWR or O_WRONLY? What is the effect of calling sem_wait, sem_trywait or sem_post on a semaphore which was created with read-only permission? Write-only permission? The standard does not specify a behavior if the semaphore was not created with both read and write permissions. Should the post and wait operations require both read/write access since this is both a read and write operation? There is no error return for this situation.

Interpretation Response
The standard is clear: only the the O_CREAT and O_EXCL flags have a defined interpretation. The other flags are unspecified and a strictly conforming application will not use them. Any usage or interpretations of the flags by an implementation would be an extension.

Rationale for Interpretation