Contents

IOServiceGetBusyState(_:_:)

Returns the busyState of an IOService.

Declaration

func IOServiceGetBusyState(_ service: io_service_t, _ busyState: UnsafeMutablePointer<UInt32>!) -> kern_return_t

Parameters

  • service:

    The IOService whose busyState to return.

  • busyState:

    The busyState count is returned.

Return Value

A kern_return_t error code.

Discussion

Many activities in IOService are asynchronous. When registration, matching, or termination is in progress on an IOService, its busyState is increased by one. Change in busyState to or from zero also changes the IOService's provider's busyState by one, which means that an IOService is marked busy when any of the above activities is ocurring on it or any of its clients.

See Also

Miscellaneous