|Anonymous | Login||2020-04-10 10:33 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001324||[1003.1(2016)/Issue7+TC2] System Interfaces||Objection||Clarification Requested||2020-02-07 15:57||2020-02-07 15:57|
|Organization||QNX Software Systems|
|Page Number||(page or range of pages)|
|Line Number||(Line or range of lines)|
|Final Accepted Text|
|Summary||0001324: sem_open() should not require the same name to map to the same virtual address|
The current specification mandates that two calls to sem_open() with the same name made by the same process return the same virtual address, so long as no process called sem_unlink() in between the two calls.
I believe that this is an unreasonable requirement, for the following reasons:
1. There is no dependency by any other sem_*() function on this requirement. So long as the two sem_t pointers returned by the calls refer to the same underlying semaphore all sem_*() functions will behave correctly when passed these pointers.
2. It puts an unnecessary burden on the system to track virtual address usage by the calling process. The system should only need to track the association of any given sem_t pointer to the underlying object. If, for example, the sem_t pointer holds a file descriptor to an open semaphore, then the system only needs to track the file descriptor.
3. Since sem_close() is documented as releasing all resources for the semaphore and making the pointer invalid for future use, the requirement promotes an unsafe "open twice, close once" paradigm.
4. The requirement deviates from the standard approach to resource allocation, where multiple calls provide different handles, even if those handles refer to the same object (e.g., open(), shm_open(), mmap() with the same file descriptor and offset)
5. The requirement may conflict with the following future direction: "A future version might require the sem_open() and sem_unlink() functions to have semantics similar to normal file system operations."
|Desired Action||Make the requirement optional|
|Tags||No tags attached.|
|There are no notes attached to this issue.|
|2020-02-07 15:57||elahav||New Issue|
|2020-02-07 15:57||elahav||Name||=> Elad Lahav|
|2020-02-07 15:57||elahav||Organization||=> QNX Software Systems|
|2020-02-07 15:57||elahav||Section||=> sem_open()|
|2020-02-07 15:57||elahav||Page Number||=> (page or range of pages)|
|2020-02-07 15:57||elahav||Line Number||=> (Line or range of lines)|
|2020-02-07 19:14||elahav||Issue Monitored: elahav|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|