1 #ifndef __OSX_ASSUMES_H__
2 #define __OSX_ASSUMES_H__
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.
8 #include <os/assumes.h>
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))
18 typedef os_redirect_t osx_redirect_t
;
19 typedef os_log_callout_t osx_log_callout_t
;
21 #define osx_set_crash_message(arg) os_set_crash_message(arg)
23 #define osx_assumes(e) os_assumes((e))
24 #define osx_assumes_zero(e) os_assumes_zero((e))
26 #define osx_assert(e) os_assert((e))
27 #define osx_assert_zero(e) os_assert_zero((e))
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))
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))
35 __OSX_AVAILABLE_STARTING(__MAC_10_7
, __IPHONE_4_3
)
37 _osx_assumes_log(uint64_t code
);
39 __OSX_AVAILABLE_STARTING(__MAC_10_8
, __IPHONE_6_0
)
41 _osx_assert_log(uint64_t code
);
43 __OSX_AVAILABLE_STARTING(__MAC_10_8
, __IPHONE_6_0
)
45 _osx_assumes_log_ctx(osx_log_callout_t callout
, void *ctx
, uint64_t code
);
47 __OSX_AVAILABLE_STARTING(__MAC_10_8
, __IPHONE_6_0
)
49 _osx_assert_log_ctx(osx_log_callout_t callout
, void *ctx
, uint64_t code
);
51 __OSX_AVAILABLE_STARTING(__MAC_10_8
, __IPHONE_6_0
)
53 _osx_avoid_tail_call(void);
57 #endif /* __OSX_ASSUMES_H__ */