dispatch_source_get_handle
Returns the underlying system handle associated with the specified dispatch source.
Declaration
extern uintptr_t dispatch_source_get_handle(dispatch_source_t source);Parameters
- source:
This parameter cannot be NULL.
Return Value
The return value should be interpreted according to the type of the dispatch source, and can be one of the following:
DISPATCH_SOURCE_TYPE_MACH_SEND: mach port (
mach_port_t)DISPATCH_SOURCE_TYPE_MACH_RECV: mach port (
mach_port_t)DISPATCH_SOURCE_TYPE_PROC: process identifier (
pid_t)DISPATCH_SOURCE_TYPE_READ: file descriptor (
int)DISPATCH_SOURCE_TYPE_SIGNAL: signal number (
int)DISPATCH_SOURCE_TYPE_VNODE: file descriptor (
int)Dispatch Source Memory Pressure Event Flags: file descriptor (int)
Discussion
The handle returned is a reference to the underlying system object being monitored by the dispatch source.