1#ifndef __OSX_ASSUMES_H__ 2#define __OSX_ASSUMES_H__ 3 4/* The interfaces in this file have been replaced by those in os/assumes.h. 5 * Use the os_*() variants instead of these. The posix_assumes_*() macros have 6 * moved to os/assumes.h. 7 */ 8#include <os/assumes.h> 9 10__BEGIN_DECLS 11 12#define osx_fastpath(x) os_fastpath(x) 13#define osx_slowpath(x) os_slowpath(x) 14#define osx_constant(x) os_constant(x) 15#define osx_hardware_trap() os_hardware_trap() 16#define __OSX_COMPILETIME_ASSERT__(e) __OS_COMPILETIME_ASSERT__((e)) 17 18typedef os_redirect_t osx_redirect_t; 19typedef os_log_callout_t osx_log_callout_t; 20 21#define osx_set_crash_message(arg) os_set_crash_message(arg) 22 23#define osx_assumes(e) os_assumes((e)) 24#define osx_assumes_zero(e) os_assumes_zero((e)) 25 26#define osx_assert(e) os_assert((e)) 27#define osx_assert_zero(e) os_assert_zero((e)) 28 29#define osx_assumes_ctx(f, ctx, e) os_assumes_ctx((f), (ctx), (e)) 30#define osx_assumes_zero_ctx(f, ctx, e) os_assumes_zero_ctx((f), (ctx), (e)) 31 32#define osx_assert_ctx(f, ctx, e) os_assert_ctx((f), (ctx), (e)) 33#define osx_assert_zero_ctx(f, ctx, e) os_assert_zero_ctx((f), (ctx), (e)) 34 35__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3) 36extern void 37_osx_assumes_log(uint64_t code); 38 39__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0) 40extern char * 41_osx_assert_log(uint64_t code); 42 43__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0) 44extern void 45_osx_assumes_log_ctx(osx_log_callout_t callout, void *ctx, uint64_t code); 46 47__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0) 48extern char * 49_osx_assert_log_ctx(osx_log_callout_t callout, void *ctx, uint64_t code); 50 51__OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0) 52extern void 53_osx_avoid_tail_call(void); 54 55__END_DECLS 56 57#endif /* __OSX_ASSUMES_H__ */ 58