Bewerken

Delen via


WDF_IO_QUEUE_IDLE function (wdfio.h)

[Applies to KMDF and UMDF]

The WDF_IO_QUEUE_IDLE function returns TRUE if an I/O queue's state indicates that the queue is drained.

Syntax

BOOLEAN WDF_IO_QUEUE_IDLE(
  [in] WDF_IO_QUEUE_STATE State
);

Parameters

[in] State

A WDF_IO_QUEUE_STATE-typed value that WdfIoQueueGetState returns.

Return value

WDF_IO_QUEUE_IDLE returns TRUE if the specified queue state indicates that the queue is idle. Otherwise, the function returns FALSE.

Remarks

An I/O queue is idle if the queue contains no I/O requests, and if all delivered requests have been completed or canceled.

Your driver can call WDF_IO_QUEUE_IDLE after it has called WdfIoQueueGetState.

For more information about I/O queue states, see WDF_IO_QUEUE_STATE.

Examples

The following code example is a routine that returns TRUE if a specified I/O queue is idle.

BOOLEAN
IsQueueIdle(
    IN WDFQUEUE Queue
    )
{
    WDF_IO_QUEUE_STATE queueStatus;
    queueStatus = WdfIoQueueGetState(
                                     Queue,
                                     NULL,
                                     NULL
                                     );
    return (WDF_IO_QUEUE_IDLE(queueStatus)) ? TRUE : FALSE;
}

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Header wdfio.h (include Wdf.h)
Library None
IRQL Any IRQL.

See also

WDF_IO_QUEUE_DRAINED

WDF_IO_QUEUE_PURGED

WDF_IO_QUEUE_READY

WDF_IO_QUEUE_STOPPED