Skip to content

Commit

Permalink
unify the CL_INVALID_COMMAND_QUEUE behavior for semaphore signals and…
Browse files Browse the repository at this point in the history
… waits
  • Loading branch information
bashbaug committed Sep 9, 2024
1 parent 0134139 commit 3bda33a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions api/cl_khr_semaphore.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,6 @@ while (true) {
{CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR} (provisional).
* Revision 1.0.0, 2024-03-15
** First non-provisional version.
* Revision 1.0.1, 2024-09-08
** Unified {CL_INVALID_COMMAND_QUEUE} error behavior for
{clEnqueueSignalSemaphoresKHR} and {clEnqueueWaitSemaphoresKHR}.
15 changes: 8 additions & 7 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13284,7 +13284,9 @@ Otherwise, it returns one of the following errors:
** if _command_queue_ is not a valid command-queue, or
** if the device associated with _command_queue_ is not same as one of the
devices specified by {CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR} at the time
of creating one or more of _sema_objects_.
of creating one or more of _sema_objects_, or
** if one or more of _sema_objects_ belong to a context that does not
contain a device associated with _command_queue_.
* {CL_INVALID_VALUE} if _num_sema_objects_ is 0.
* {CL_INVALID_SEMAPHORE_KHR} if any of the semaphore objects specified by
_sema_objects_ is not valid.
Expand Down Expand Up @@ -13397,11 +13399,11 @@ Otherwise, it returns one of the following errors:
_sema_objects_ requires a semaphore payload and _sema_payload_list_ is
`NULL`.
* {CL_INVALID_EVENT_WAIT_LIST}
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is not
0, or
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is
0, or
** if event objects in _event_wait_list_ are not valid events.
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is not 0,
or
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is 0,
or
** if event objects in _event_wait_list_ are not valid events.
* {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST} if the execution status
of any of the events in _event_wait_list_ is a negative integer value.
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources
Expand All @@ -13410,7 +13412,6 @@ Otherwise, it returns one of the following errors:
required by the OpenCL implementation on the host.
--


=== Retaining and Releasing Semaphores

[open,refpage='clReleaseSemaphoreKHR',desc='Release a semaphore object',type='protos']
Expand Down

0 comments on commit 3bda33a

Please sign in to comment.