Function

CFFileDescriptorCreateRunLoopSource

Creates a new runloop source for a given CFFileDescriptor.

Declaration

CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource(CFAllocatorRef allocator, CFFileDescriptorRef f, CFIndex order);

Parameters

allocator

The allocator to use to allocate memory for the new bag and its storage for values. Pass NULL or kCFAllocatorDefault to use the current default allocator.

f

A CFFileDescriptor.

order

The order for the new run loop (see CFRunLoopSourceCreate).

Return Value

A new runloop source for f, or NULL if there was a problem creating the object. Ownership follows the The Create Rule.

Discussion

The context for the new runloop (see CFRunLoopSourceCreate) is the same as the context passed in when the CFFileDescriptor was created (see CFFileDescriptorCreate).