Unlike timeline semaphores, fences or events, the act of waiting for a binary semaphore also unsignals that semaphore.
This language is ambiguous as to when "the act of waiting" occurs. I believe the intent is that the semaphore is unsignaled after the wait completes; but "the act of waiting" can be read as happening when the wait begins.
I suggest:
Unlike timeline semaphores, fences or events, waiting for a binary semaphore also unsignals that semaphore when the wait completes.
Note that the phrases "when" and "after" are probably -- in the language of the spec -- ill-defined since (as far as I can tell) there isn't necessarily a globally-consistent timeline among all threads of execution implied. On the other hand these words are already used elsewhere in the section.
From Semaphore Waiting:
This language is ambiguous as to when "the act of waiting" occurs. I believe the intent is that the semaphore is unsignaled after the wait completes; but "the act of waiting" can be read as happening when the wait begins.
I suggest:
Note that the phrases "when" and "after" are probably -- in the language of the spec -- ill-defined since (as far as I can tell) there isn't necessarily a globally-consistent timeline among all threads of execution implied. On the other hand these words are already used elsewhere in the section.