WDF_IO_QUEUE_PURGED function

[Applies to KMDF and UMDF]

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

Syntax


BOOLEAN WDF_IO_QUEUE_PURGED(
  _In_  WDF_IO_QUEUE_STATE State
);

Parameters

State [in]

A WDF_IO_QUEUE_STATE-typed value that WdfIoQueueGetState returns.

Return value

WDF_IO_QUEUE_PURGED returns TRUE if the specified queue state indicates that the queue is purged. Otherwise, the function returns FALSE.

Remarks

An I/O queue is purged if the queue is empty and not accepting new I/O requests, and if all requests that were in the queue have been canceled.

Your driver can call WDF_IO_QUEUE_PURGED 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 purged.


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

Requirements

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_IDLE
WDF_IO_QUEUE_READY
WDF_IO_QUEUE_STOPPED

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.