Mac Developer Library

Developer

IOUserClient Class Reference

Options
Deployment Target:

On This Page
Language:

IOUserClient

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.0 and later.

Provides a basis for communication between client applications and I/O Kit objects.

  • Declaration

    C++

    virtual IOReturn exportObjectToClient( task_ttask, OSObject *obj, io_object_t *clientObj);

    Parameters

    task

    The task.

    obj

    The object we want to export to the client.

    clientObj

    Returned value is the client's port name.

    Discussion

    Make an arbitrary OSObject available to the client task.

  • Release the mach_port_t reference held within the OSAsyncReference64 structure.

    Declaration

    C++

    static IOReturn releaseAsyncReference64( OSAsyncReference64reference);

    Parameters

    reference

    The reference passed to the subclass IOAsyncMethod, or externalMethod() in the IOExternalMethodArguments.asyncReference field.

    Return Value

    A return code.

    Discussion

    The OSAsyncReference64 structure passed to async methods holds a reference to the wakeup mach port, which should be released to balance each async method call. Behavior is undefined if these calls are not correctly balanced.

  • Release the mach_port_t passed to registerNotificationPort().

    Declaration

    C++

    static IOReturn releaseNotificationPort( mach_port_treference);

    Parameters

    reference

    The mach_port_t argument previously passed to the subclass implementation of registerNotificationPort().

    Return Value

    A return code.

    Discussion

    The mach_port_t passed to the registerNotificationPort() methods should be released to balance each call to registerNotificationPort(). Behavior is undefined if these calls are not correctly balanced.

  • Declaration

    C++

    IOMemoryMap * removeMappingForDescriptor( IOMemoryDescriptor *memory);

    Parameters

    memory

    The memory descriptor instance previously returned by the implementation of clientMemoryForType().

    Return Value

    A reference to the first IOMemoryMap instance found in the list of mappings created by IOUserClient from that passed memory descriptor is returned, or zero if none exist. The caller should release this reference.

    Discussion

    Remove the first mapping created from the memory descriptor returned by clientMemoryForType() from IOUserClient's list of mappings. If such a mapping exists, it is retained and the reference currently held by IOUserClient is returned to the caller.

  • Send a notification as with sendAsyncResult, but with finite queueing.

    Declaration

    C++

    static IOReturn sendAsyncResult64WithOptions( OSAsyncReference64 reference, IOReturn result, io_user_reference_t args[], UInt32 numArgs, IOOptionBits options);

    Discussion

    IOUserClient::sendAsyncResult64() will infitely queue messages if the client is not processing them in a timely fashion. This variant will not, for simple handling of situations where clients may be expected to stop processing messages.

Data Types

  • Declaration

    C++

    struct ExpansionData { #if IOKITSTATS IOUserClientCounter *counter; #else void *iokitstatsReserved; #endif };

    Discussion

    This structure will be used to expand the capablilties of this class in the future.

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData * reserved;