@@ -12866,6 +12866,10 @@ ifdef::cl_khr_external_semaphore[]
12866
12866
12867
12867
[open,refpage='clGetSemaphoreHandleForTypeKHR',desc='Export external handle from a semaphore',type='protos']
12868
12868
--
12869
+
12870
+ Export operations have the same transference as the specified handle type's import operations. Additionally, exporting a semaphore payload to a handle with copy transference has the same side effects on the source semaphore's payload as executing a semaphore wait operation.
12871
+
12872
+ Please refer to handle specific documentation for more details on transference requirements per handle type.
12869
12873
To export an external handle from a semaphore, call the function
12870
12874
12871
12875
include::{generated}/api/protos/clGetSemaphoreHandleForTypeKHR.txt[]
@@ -12919,53 +12923,19 @@ Otherwise, it returns one of the following errors:
12919
12923
12920
12924
=== Importing Semaphore External Handles
12921
12925
12922
- Applications can import a semaphore payload into an existing semaphore using
12923
- an external semaphore handle.
12924
- The effects of the import operation will be either temporary or permanent,
12925
- as specified by the application.
12926
- If the import is temporary, the implementation must restore the semaphore to
12927
- its prior permanent state after submitting the next semaphore wait
12928
- operation.
12929
- Performing a subsequent temporary import on a semaphore before performing a
12930
- semaphore wait has no effect on this requirement; the next wait submitted on
12931
- the semaphore must still restore its last permanent state.
12932
- A permanent payload import behaves as if the target semaphore was destroyed,
12933
- and a new semaphore was created with the same handle but the imported
12934
- payload.
12935
- Because importing a semaphore payload temporarily or permanently detaches
12936
- the existing payload from a semaphore, similar usage restrictions to those
12937
- applied to {clReleaseSemaphoreKHR} are applied to any command that imports a
12938
- semaphore payload.
12939
- Which of these import types is used is referred to as the import operation's
12940
- permanence.
12941
- Each handle type supports either one or both types of permanence.
12942
-
12943
- The implementation must perform the import operation by either referencing
12944
- or copying the payload referred to by the specified external semaphore
12945
- handle, depending on the handle's type.
12946
- The import method used is referred to as the handle type's transference.
12947
- When using handle types with reference transference, importing a payload to
12948
- a semaphore adds the semaphore to the set of all semaphores sharing that
12949
- payload.
12950
- This set includes the semaphore from which the payload was exported.
12951
- Semaphore signaling and waiting operations performed on any semaphore in the
12952
- set must behave as if the set were a single semaphore.
12953
- Importing a payload using handle types with copy transference creates a
12954
- duplicate copy of the payload at the time of import, but makes no further
12955
- reference to it.
12956
- Semaphore signaling and waiting operations performed on the target of copy
12957
- imports must not affect any other semaphore or payload.
12958
-
12959
- Export operations have the same transference as the specified handle type's
12960
- import operations.
12961
- Additionally, exporting a semaphore payload to a handle with copy
12962
- transference has the same side effects on the source semaphore's payload as
12963
- executing a semaphore wait operation.
12964
- If the semaphore was using a temporarily imported payload, the semaphore's
12965
- prior permanent payload will be restored.
12966
-
12967
- Please refer to handle specific specifications for more details on
12968
- transference and permanence requirements specific to handle type.
12926
+ Applications can import a semaphore payload by creating a semaphore from an external handle. The
12927
+ implementation must perform the import operation by either referencing or copying the payload
12928
+ referred to by the specified external semaphore handle, depending on the handle's type. When using
12929
+ handle types with reference transference, importing a payload to a semaphore adds the semaphore to
12930
+ the set of all semaphores sharing that payload. This set includes the semaphore from which the payload
12931
+ was exported. Semaphore signaling and waiting operations performed on any semaphore in the set must
12932
+ behave as if the set were a single semaphore. Importing a payload using handle types with copy
12933
+ transference creates a duplicate copy of the payload at the time of import, but makes no further
12934
+ reference to it. Semaphore signaling and waiting operations performed on the target of copy imports
12935
+ must not affect any other semaphore or payload.
12936
+
12937
+ Please refer to handle specific documentation for more details on transference requirements per
12938
+ handle type.
12969
12939
12970
12940
12971
12941
=== Descriptions of External Semaphore Handle Types
@@ -13034,25 +13004,23 @@ descriptor when exporting a {CL_SEMAPHORE_HANDLE_SYNC_FD_KHR} from a
13034
13004
13035
13005
endif::cl_khr_external_semaphore_sync_fd[]
13036
13006
13037
- .Transference and Permanence Properties for File Descriptor Handles
13038
- [width="100%",cols="60%,<20%,<20 %",options="header"]
13007
+ .Transference Properties for File Descriptor Handles
13008
+ [width="100%",cols="60%,<40 %",options="header"]
13039
13009
|====
13040
- | Handle Type | Transference | Permanence
13010
+ | Handle Type | Transference
13041
13011
13042
13012
ifdef::cl_khr_external_semaphore_opaque_fd[]
13043
13013
| {CL_SEMAPHORE_HANDLE_OPAQUE_FD_KHR_anchor}
13044
13014
13045
13015
include::{generated}/api/version-notes/CL_SEMAPHORE_HANDLE_OPAQUE_FD_KHR.asciidoc[]
13046
13016
| Reference
13047
- | Temporary, Permanent
13048
13017
endif::cl_khr_external_semaphore_opaque_fd[]
13049
13018
13050
13019
ifdef::cl_khr_external_semaphore_sync_fd[]
13051
13020
| {CL_SEMAPHORE_HANDLE_SYNC_FD_KHR_anchor}
13052
13021
13053
13022
include::{generated}/api/version-notes/CL_SEMAPHORE_HANDLE_SYNC_FD_KHR.asciidoc[]
13054
13023
| Copy
13055
- | Temporary
13056
13024
endif::cl_khr_external_semaphore_sync_fd[]
13057
13025
|====
13058
13026
@@ -13130,24 +13098,21 @@ a semaphore from an external handle:
13130
13098
13131
13099
endif::cl_khr_external_semaphore_win32[]
13132
13100
13133
- .Transference and Permanence Properties for NT Handle Types
13134
- [width="100%",cols="60%,<20%,<20 %",options="header"]
13101
+ .Transference Properties for NT Handle Types
13102
+ [width="100%",cols="60%,<40 %",options="header"]
13135
13103
|====
13136
- | Handle Type | Transference | Permanence
13104
+ | Handle Type | Transference
13137
13105
13138
13106
ifdef::cl_khr_external_semaphore_win32[]
13139
13107
| {CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KHR_anchor}
13140
13108
13141
13109
include::{generated}/api/version-notes/CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KHR.asciidoc[]
13142
13110
| Reference
13143
- | Temporary, Permanent
13144
13111
| {CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KMT_KHR_anchor}
13145
13112
13146
13113
include::{generated}/api/version-notes/CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KMT_KHR.asciidoc[]
13147
13114
| Reference
13148
- | Temporary, Permanent
13149
13115
endif::cl_khr_external_semaphore_win32[]
13150
- |====
13151
13116
13152
13117
// TODO Why "Windows handles" here but "NT handles" elsewhere?
13153
13118
0 commit comments