introspection.h

Includes:
"headerdoc.h"
<dispatch/dispatch.h>

Introduction

Interposable introspection hooks for libdispatch.

Discussion

These hooks are only available in the introspection version of the library, loaded by running a process with the environment variable DYLD_LIBRARY_PATH=/usr/lib/system/introspection



Functions

dispatch_introspection_hook_queue_callout_begin

Interposable hook function called when a client function is about to be called out to on a dispatch queue.

dispatch_introspection_hook_queue_callout_end

Interposable hook function called after a client function has returned from a callout on a dispatch queue.

dispatch_introspection_hook_queue_create

Interposable hook function called when a dispatch queue was created.

dispatch_introspection_hook_queue_destroy

Interposable hook function called when a dispatch queue is about to be destroyed.

dispatch_introspection_hook_queue_item_complete

Interposable hook function called when an item previously dequeued from a dispatch queue has completed processing.

dispatch_introspection_hook_queue_item_dequeue

Interposable hook function called when an item was dequeued from a dispatch queue.

dispatch_introspection_hook_queue_item_enqueue

Interposable hook function called when an item is about to be enqueued onto a dispatch queue.


dispatch_introspection_hook_queue_callout_begin


Interposable hook function called when a client function is about to be called out to on a dispatch queue.

(
    macos(
        10.9),
    ios(
        7.0))  void dispatch_introspection_hook_queue_callout_begin(
    dispatch_queue_t queue, 
    void *_Nullable context,
    dispatch_function_t function);  
Parameters
queue

The dispatch queue the callout is performed on.

context

The context parameter passed to the function. For a callout to a block, this is a pointer to the block object.

function

The client function about to be called out to. For a callout to a block, this is the block object's invoke function.


dispatch_introspection_hook_queue_callout_end


Interposable hook function called after a client function has returned from a callout on a dispatch queue.

(
    macos(
        10.9),
    ios(
        7.0))  void dispatch_introspection_hook_queue_callout_end(
    dispatch_queue_t queue, 
    void *_Nullable context,
    dispatch_function_t function);  
Parameters
queue

The dispatch queue the callout was performed on.

context

The context parameter passed to the function. For a callout to a block, this is a pointer to the block object.

function

The client function that was called out to. For a callout to a block, this is the block object's invoke function.


dispatch_introspection_hook_queue_create


Interposable hook function called when a dispatch queue was created.

(
    macos(
        10.9),
    ios(
        7.0))  void dispatch_introspection_hook_queue_create(
    dispatch_queue_t queue);  
Parameters
queue

The newly created dispatch queue.


dispatch_introspection_hook_queue_destroy


Interposable hook function called when a dispatch queue is about to be destroyed.

(
    macos(
        10.9),
    ios(
        7.0))  void dispatch_introspection_hook_queue_destroy(
    dispatch_queue_t queue);  
Parameters
queue

The dispatch queue about to be destroyed.


dispatch_introspection_hook_queue_item_complete


Interposable hook function called when an item previously dequeued from a dispatch queue has completed processing.

(
    macos(
        10.10),
    ios(
        7.1))  void dispatch_introspection_hook_queue_item_complete(
    dispatch_object_t item);  
Parameters
item

Opaque dentifier for completed item. Must NOT be dereferenced.

Discussion

The object pointer value passed to this function must be treated as a value only. It is intended solely for matching up with an earlier call to a dequeue hook function and must NOT be dereferenced.


dispatch_introspection_hook_queue_item_dequeue


Interposable hook function called when an item was dequeued from a dispatch queue.

Parameters
queue

The dispatch queue dequeued from.

item

The dequeued object.


dispatch_introspection_hook_queue_item_enqueue


Interposable hook function called when an item is about to be enqueued onto a dispatch queue.

Parameters
queue

The dispatch queue enqueued onto.

item

The object about to be enqueued.