Skip to content

Commit 5444dc9

Browse files
author
Sreelakshmi Haridas Maruthur
authored
Update semaphore wait and signal rules in cl_khr_sempahore (#882)
* Update semaphore wait and signal rules in cl_khr_sempahore (#883) * Minor fix * Minor API name fix
1 parent c863557 commit 5444dc9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/cl_khr_semaphore.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ _event_ can be `NULL` in which case it will not be possible for the application
308308

309309
The semaphore wait command waits for a list of events to complete and a list of semaphore objects to become signaled.
310310
The semaphore wait command returns an _event_ which can be waited on to ensure that all events in the _event_wait_list_ have completed and all semaphores in _sema_objects_ have been signaled.
311-
The successful completion of the event generated by {clEnqueueWaitSemaphoresKHR} called on one or more semaphore objects of type {CL_SEMAPHORE_TYPE_BINARY_KHR} leads to un-signaling the corresponding semaphore objects and the state of these semaphore objects will be reset. Any subsequent {clEnqueueWaitSemaphoresKHR} operation on these semaphores without a pending {clEnqueueSignalSemaphoresKHR} may lead to implementation-defined behavior.
311+
{clEnqueueWaitSemaphoresKHR} will not return until the binary semaphores in _sema_objects_ are in a state that makes them safe to re-signal. If necessary, implementations may block in {clEnqueueWaitSemaphoresKHR} to ensure the correct state of semaphores when returning. There are no implications from this behavior for the state of _event_ or the events in _event_wait_list_ when {clEnqueueWaitSemaphoresKHR} returns. Waiting on the same binary semaphore twice without an interleaving signal may lead to undefined behavior.
312312

313313
{clEnqueueWaitSemaphoresKHR} returns {CL_SUCCESS} if the function is executed successfully.
314314
Otherwise, it returns one of the following errors:
@@ -359,7 +359,7 @@ or queue a wait for this command to complete.
359359

360360
The semaphore signal command waits for a list of events to complete and then signals a list of semaphore objects.
361361
The semaphore signal command returns an _event_ which can be waited on to ensure that all events in the _event_wait_list_ have completed and all semaphores in _sema_objects_ have been signaled.
362-
The successful completion of the event generated by {clEnqueueSignalSemaphoresKHR} called on one or more semaphore objects of type {CL_SEMAPHORE_TYPE_BINARY_KHR} changes the state of the corresponding semaphore objects to signaled. Any subsequent {clEnqueueSignalSemaphoresKHR} operation on these semaphores without a pending {clEnqueueWaitSemaphoresKHR} may lead to implementation-defined behavior.
362+
The successful completion of the event generated by {clEnqueueSignalSemaphoresKHR} called on one or more semaphore objects of type {CL_SEMAPHORE_TYPE_BINARY_KHR} changes the state of the corresponding semaphore objects to signaled. {clEnqueueSignalSemaphoresKHR} will not return until the binary semaphores in _sema_objects_ are in a state that makes them safe to wait on again. If necessary, implementations may block in {clEnqueueSignalSemaphoresKHR} to ensure the correct state of semaphores when returning. There are no implications from this behavior for the state of _event_ or the events in _event_wait_list_ when {clEnqueueSignalSemaphoresKHR} returns. Signaling the same binary semaphore twice without an interleaving wait may lead to undefined behavior.
363363

364364
{clEnqueueSignalSemaphoresKHR} returns {CL_SUCCESS} if the function is executed successfully.
365365
Otherwise, it returns one of the following errors:

0 commit comments

Comments
 (0)