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 |
Defines | |
#define | DISPATCH_SOURCE_TYPE_DATA_ADD (&_dispatch_source_type_data_add) |
A dispatch source that coalesces data obtained via calls to dispatch_source_merge_data(). | |
#define | DISPATCH_SOURCE_TYPE_DATA_OR (&_dispatch_source_type_data_or) |
A dispatch source that coalesces data obtained via calls to dispatch_source_merge_data(). | |
#define | DISPATCH_SOURCE_TYPE_MACH_SEND (&_dispatch_source_type_mach_send) |
A dispatch source that monitors a Mach port for dead name notifications (send right no longer has any corresponding receive right). | |
#define | DISPATCH_SOURCE_TYPE_MACH_RECV (&_dispatch_source_type_mach_recv) |
A dispatch source that monitors a Mach port for pending messages. | |
#define | DISPATCH_SOURCE_TYPE_PROC (&_dispatch_source_type_proc) |
A dispatch source that monitors an external process for events defined by dispatch_source_proc_flags_t. | |
#define | DISPATCH_SOURCE_TYPE_READ (&_dispatch_source_type_read) |
A dispatch source that monitors a file descriptor for pending bytes available to be read. | |
#define | DISPATCH_SOURCE_TYPE_SIGNAL (&_dispatch_source_type_signal) |
A dispatch source that monitors the current process for signals. | |
#define | DISPATCH_SOURCE_TYPE_TIMER (&_dispatch_source_type_timer) |
A dispatch source that submits the event handler block based on a timer. | |
#define | DISPATCH_SOURCE_TYPE_VNODE (&_dispatch_source_type_vnode) |
A dispatch source that monitors a file descriptor for events defined by dispatch_source_vnode_flags_t. | |
#define | DISPATCH_SOURCE_TYPE_WRITE (&_dispatch_source_type_write) |
A dispatch source that monitors a file descriptor for available buffer space to write bytes. | |
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. | |
Variables | |
struct dispatch_source_type_s | _dispatch_source_type_data_add |
struct dispatch_source_type_s | _dispatch_source_type_data_or |
struct dispatch_source_type_s | _dispatch_source_type_mach_send |
struct dispatch_source_type_s | _dispatch_source_type_mach_recv |
struct dispatch_source_type_s | _dispatch_source_type_proc |
struct dispatch_source_type_s | _dispatch_source_type_read |
struct dispatch_source_type_s | _dispatch_source_type_signal |
struct dispatch_source_type_s | _dispatch_source_type_timer |
struct dispatch_source_type_s | _dispatch_source_type_vnode |
struct dispatch_source_type_s | _dispatch_source_type_write |