Go to the source code of this file.
Classes | |
class | xdispatch::sourcetype |
Declares an abstract source type. More... | |
class | xdispatch::native_source |
Constructs a sourcetype using a dispatch_source_t object as its main source. More... | |
class | xdispatch::source |
Provides a source implementation. More... | |
Namespaces | |
namespace | xdispatch |
Typedefs | |
typedef struct dispatch_source_s * | dispatch_source_t |
The dispatch framework provides a suite of interfaces for monitoring low- level system objects (file descriptors, Mach ports, signals, VFS nodes, etc.) for activity and automatically submitting event handler blocks to dispatch queues when such activity occurs. | |
typedef struct dispatch_source_type_s * | dispatch_source_type_t |
Constants of this type represent the class of low-level system object that is being monitored by the dispatch source. | |
Enumerations | |
enum | { DISPATCH_MACH_SEND_DEAD = 0x1 } |
enum | { DISPATCH_PROC_EXIT = 0x80000000, DISPATCH_PROC_FORK = 0x40000000, DISPATCH_PROC_EXEC = 0x20000000, DISPATCH_PROC_SIGNAL = 0x08000000 } |
enum | { DISPATCH_VNODE_DELETE = 0x1, DISPATCH_VNODE_WRITE = 0x2, DISPATCH_VNODE_EXTEND = 0x4, DISPATCH_VNODE_ATTRIB = 0x8, DISPATCH_VNODE_LINK = 0x10, DISPATCH_VNODE_RENAME = 0x20, DISPATCH_VNODE_REVOKE = 0x40 } |
Functions | |
dispatch_source_t | dispatch_source_create (dispatch_source_type_t type, uintptr_t handle, unsigned long mask, dispatch_queue_t queue) |
Creates a new dispatch source to monitor low-level system objects and auto- matically submit a handler block to a dispatch queue in response to events. | |
void | dispatch_source_set_event_handler (dispatch_source_t source, dispatch_block_t handler) |
Sets the event handler block for the given dispatch source. | |
void | dispatch_source_set_event_handler_f (dispatch_source_t source, dispatch_function_t handler) |
Sets the event handler function for the given dispatch source. | |
void | dispatch_source_set_cancel_handler (dispatch_source_t source, dispatch_block_t cancel_handler) |
Sets the cancellation handler block for the given dispatch source. | |
void | dispatch_source_set_cancel_handler_f (dispatch_source_t source, dispatch_function_t cancel_handler) |
Sets the cancellation handler function for the given dispatch source. | |
void | dispatch_source_cancel (dispatch_source_t source) |
Asynchronously cancel the dispatch source, preventing any further invocation of its event handler block. | |
long | dispatch_source_testcancel (dispatch_source_t source) |
Tests whether the given dispatch source has been canceled. | |
uintptr_t | dispatch_source_get_handle (dispatch_source_t source) |
Returns the underlying system handle associated with this dispatch source. | |
unsigned long | dispatch_source_get_mask (dispatch_source_t source) |
Returns the mask of events monitored by the dispatch source. | |
unsigned long | dispatch_source_get_data (dispatch_source_t source) |
Returns pending data for the dispatch source. | |
void | dispatch_source_merge_data (dispatch_source_t source, unsigned long value) |
Merges data into a dispatch source of type DISPATCH_SOURCE_TYPE_DATA_ADD or DISPATCH_SOURCE_TYPE_DATA_OR and submits its event handler block to its target queue. | |
void | dispatch_source_set_timer (dispatch_source_t source, dispatch_time_t start, uint64_t interval, uint64_t leeway) |
Sets a start time, interval, and leeway value for a timer source. |