Contents

probe

During an IOService object's instantiation, probes a matched service to see if it can be used.

Declaration

virtual IOService * probe(
 IOService *provider, 
 SInt32 *score );

Parameters

  • provider:

    The registered IOService object that matches a driver personality's matching dictionary.

  • score:

    Pointer to the current driver's probe score, which is used to order multiple matching drivers in the same match category. It defaults to the value of the IOProbeScore property in the drivers property table, or kIODefaultProbeScore if none is specified. The probe method may alter the score to affect start order.

Return Value

An IOService instance or zero when the probe is unsuccessful. In almost all cases the value of this is returned on success. If another IOService object is returned, the probed instance is detached and freed, and the returned instance is used in its stead for start.

Overview

The registration process for an IOService object (the provider) includes instantiating possible driver clients. The probe method is called in the client instance to check the matched service can be used before the driver is considered to be started. Since matching screens many possible providers, in many cases the probe method can be left unimplemented by IOService subclasses. The client is already attached to the provider when probe is called.

See Also

Miscellaneous