Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 2.63 KB

nf-ioringapi-setioringcompletionevent.md

File metadata and controls

80 lines (63 loc) · 2.63 KB
UID tech.root title ms.date targetos description prerelease req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs helpviewer_keywords
NF:ioringapi.SetIoRingCompletionEvent
fs
SetIoRingCompletionEvent
04/21/2022
Windows
Registers a completion queue event with an IORING.
false
function
ioringapi.h
Windows Build 22000
Windows Build 22000
apiref
HeaderDef
ioringapi.h
SetIoRingCompletionEvent
SetIoRingCompletionEvent
ioringapi/SetIoRingCompletionEvent
c++
SetIoRingCompletionEvent

-description

Registers a completion queue event with an I/O ring.

-parameters

-param ioRing

An HIORING representing a handle to the I/O ring for which the completion event is registered.

-param hEvent

A handle to the event object. The CreateEvent or OpenEvent function returns this handle.

-returns

Returns an HRESULT including the following values:

Value Description
S_OK Success
E_INVALID_HANDLE An invalid handle was passed in the ioRing parameter.
E_INVALIDARG An invalid handle was passed in the hEvent parameter.

-remarks

The kernel will signal this event when it places the first entry into an empty completion queue, i.e. the kernel only sets the event to the signaled state when the completion queue transitions from the empty to non-empty state. Applications should call PopIoRingCompletion until it indicates no more entries and then wait for any additional async completions to complete via the provided HANDLE. Otherwise, the event won’t enter the signaled state and the wait may block until a timeout occurs, or forever if an infinite timeout is used.

The kernel will internally duplicate the handle, so it is safe for the application to close the handle when waits are no longer needed. Providing an event handle value of NULL simply clears any existing value. Setting a value of INVALID_HANDLE_VALUE raises an error, as will any other invalid handle value, to aid in detecting code bugs early.

There is, at most, one event handle associated with an HIORING, attempting to set a second one will replace any that already exists.

-see-also

PopIoRingCompletion