2  * Copyright (c) 2008-2009 Apple Inc. All rights reserved. 
   4  * @APPLE_APACHE_LICENSE_HEADER_START@ 
   6  * Licensed under the Apache License, Version 2.0 (the "License"); 
   7  * you may not use this file except in compliance with the License. 
   8  * You may obtain a copy of the License at 
  10  *     http://www.apache.org/licenses/LICENSE-2.0 
  12  * Unless required by applicable law or agreed to in writing, software 
  13  * distributed under the License is distributed on an "AS IS" BASIS, 
  14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
  15  * See the License for the specific language governing permissions and 
  16  * limitations under the License. 
  18  * @APPLE_APACHE_LICENSE_HEADER_END@ 
  22  * IMPORTANT: This header file describes INTERNAL interfaces to libdispatch 
  23  * which are subject to change in future releases of Mac OS X. Any applications 
  24  * relying on these interfaces WILL break. 
  27 #ifndef __DISPATCH_PRIVATE__ 
  28 #define __DISPATCH_PRIVATE__ 
  30 #include <mach/boolean.h> 
  31 #include <mach/mach.h> 
  32 #include <mach/message.h> 
  34 #include <sys/cdefs.h> 
  35 #include <sys/event.h> 
  38 #ifndef __DISPATCH_BUILDING_DISPATCH__ 
  39 #include_next <dispatch/dispatch.h> 
  41 // Workaround <rdar://problem/6597365/> 
  42 #ifndef __DISPATCH_PUBLIC__ 
  43 #include "/usr/include/dispatch/dispatch.h" 
  46 #ifndef __DISPATCH_INDIRECT__ 
  47 #define __DISPATCH_INDIRECT__ 
  50 #include <dispatch/benchmark.h> 
  51 #include <dispatch/queue_private.h> 
  52 #include <dispatch/source_private.h> 
  54 #ifndef DISPATCH_NO_LEGACY 
  55 #include <dispatch/legacy.h> 
  58 #undef __DISPATCH_INDIRECT__ 
  60 #endif /* !__DISPATCH_BUILDING_DISPATCH__ */ 
  62 /* LEGACY: Use DISPATCH_API_VERSION */ 
  63 #define LIBDISPATCH_VERSION DISPATCH_API_VERSION 
  69 libdispatch_init(void); 
  71 #define DISPATCH_COCOA_COMPAT 1 
  72 #if DISPATCH_COCOA_COMPAT 
  74 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
  77 _dispatch_get_main_queue_port_4CF(void); 
  79 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
  82 _dispatch_main_queue_callback_4CF(mach_msg_header_t 
*msg
); 
  84 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
  85 extern void (*dispatch_begin_thread_4GC
)(void); 
  87 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
  88 extern void (*dispatch_end_thread_4GC
)(void); 
  90 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
  91 extern void *(*_dispatch_begin_NSAutoReleasePool
)(void); 
  93 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
  94 extern void (*_dispatch_end_NSAutoReleasePool
)(void *); 
 100 DISPATCH_NOTHROW 
void dispatch_atfork_prepare(void); 
 101 DISPATCH_NOTHROW 
void dispatch_atfork_parent(void); 
 102 DISPATCH_NOTHROW 
void dispatch_atfork_child(void); 
 103 DISPATCH_NOTHROW 
void dispatch_init_pthread(pthread_t
); 
 106  * Extract the context pointer from a mach message trailer. 
 108 __OSX_AVAILABLE_STARTING(__MAC_10_6
,__IPHONE_NA
) 
 110 dispatch_mach_msg_get_context(mach_msg_header_t 
*msg
);