Skip to content

Commit 55cf4ab

Browse files
committed
Update the documentation for the Level Zero IPC example
1 parent 0a893d7 commit 55cf4ab

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/docs_config/examples.rst

+6-3
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,15 @@ to another process it can be opened by the :any:`umfOpenIPCHandle` function.
194194

195195
.. code-block:: c
196196
197+
umf_ipc_handler_handle_t ipc_handler = 0;
198+
umf_result = umfPoolGetIPCHandler(consumer_pool, &ipc_handler);
199+
197200
void *mapped_buf = NULL;
198-
umf_result = umfOpenIPCHandle(consumer_pool, ipc_handle, &mapped_buf);
201+
umf_result = umfOpenIPCHandle(ipc_handler, ipc_handle, &mapped_buf);
199202
200-
The :any:`umfOpenIPCHandle` function requires the memory pool handle and the IPC handle as input parameters. It maps
203+
The :any:`umfOpenIPCHandle` function requires the IPC handler and the IPC handle as input parameters. The IPC handler maps
201204
the handle to the current process address space and returns the pointer to the same memory region that was allocated
202-
in the producer process.
205+
in the producer process. To retrieve the IPC handler, the :any:`umfPoolGetIPCHandler` function is used.
203206

204207
.. note::
205208
The virtual addresses of the memory region referred to by the IPC handle may not be the same in the producer and consumer processes.

0 commit comments

Comments
 (0)