Contents

IOIteratorIsValid(_:)

Checks an iterator is still valid.

Declaration

func IOIteratorIsValid(_ iterator: io_iterator_t) -> boolean_t

Parameters

  • iterator:

    An IOKit iterator handle.

Return Value

True if the iterator handle is valid, otherwise false is returned.

Discussion

Some iterators will be made invalid if changes are made to the structure they are iterating over. This function checks the iterator is still valid and should be called when IOIteratorNext returns zero. An invalid iterator can be reset and the iteration restarted.

See Also

Miscellaneous