… | |
… | |
43 | # include EV_CONFIG_H |
43 | # include EV_CONFIG_H |
44 | # else |
44 | # else |
45 | # include "config.h" |
45 | # include "config.h" |
46 | # endif |
46 | # endif |
47 | |
47 | |
48 | #if HAVE_FLOOR |
48 | # if HAVE_FLOOR |
49 | # ifndef EV_USE_FLOOR |
49 | # ifndef EV_USE_FLOOR |
50 | # define EV_USE_FLOOR 1 |
50 | # define EV_USE_FLOOR 1 |
|
|
51 | # endif |
51 | # endif |
52 | # endif |
52 | #endif |
|
|
53 | |
53 | |
54 | # if HAVE_CLOCK_SYSCALL |
54 | # if HAVE_CLOCK_SYSCALL |
55 | # ifndef EV_USE_CLOCK_SYSCALL |
55 | # ifndef EV_USE_CLOCK_SYSCALL |
56 | # define EV_USE_CLOCK_SYSCALL 1 |
56 | # define EV_USE_CLOCK_SYSCALL 1 |
57 | # ifndef EV_USE_REALTIME |
57 | # ifndef EV_USE_REALTIME |
… | |
… | |
253 | #ifndef EV_USE_CLOCK_SYSCALL |
253 | #ifndef EV_USE_CLOCK_SYSCALL |
254 | # if __linux && __GLIBC__ == 2 && __GLIBC_MINOR__ < 17 |
254 | # if __linux && __GLIBC__ == 2 && __GLIBC_MINOR__ < 17 |
255 | # define EV_USE_CLOCK_SYSCALL EV_FEATURE_OS |
255 | # define EV_USE_CLOCK_SYSCALL EV_FEATURE_OS |
256 | # else |
256 | # else |
257 | # define EV_USE_CLOCK_SYSCALL 0 |
257 | # define EV_USE_CLOCK_SYSCALL 0 |
|
|
258 | # endif |
|
|
259 | #endif |
|
|
260 | |
|
|
261 | #if !(_POSIX_TIMERS > 0) |
|
|
262 | # ifndef EV_USE_MONOTONIC |
|
|
263 | # define EV_USE_MONOTONIC 0 |
|
|
264 | # endif |
|
|
265 | # ifndef EV_USE_REALTIME |
|
|
266 | # define EV_USE_REALTIME 0 |
258 | # endif |
267 | # endif |
259 | #endif |
268 | #endif |
260 | |
269 | |
261 | #ifndef EV_USE_MONOTONIC |
270 | #ifndef EV_USE_MONOTONIC |
262 | # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 |
271 | # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 |
… | |
… | |
805 | #define ecb_decltype(x) __decltype(x) |
814 | #define ecb_decltype(x) __decltype(x) |
806 | #elif ECB_GCC_VERSION(3,0) |
815 | #elif ECB_GCC_VERSION(3,0) |
807 | #define ecb_decltype(x) __typeof(x) |
816 | #define ecb_decltype(x) __typeof(x) |
808 | #endif |
817 | #endif |
809 | |
818 | |
|
|
819 | #if _MSC_VER >= 1300 |
|
|
820 | #define ecb_deprecated __declspec(deprecated) |
|
|
821 | #else |
|
|
822 | #define ecb_deprecated ecb_attribute ((__deprecated__)) |
|
|
823 | #endif |
|
|
824 | |
810 | #define ecb_noinline ecb_attribute ((__noinline__)) |
825 | #define ecb_noinline ecb_attribute ((__noinline__)) |
811 | #define ecb_unused ecb_attribute ((__unused__)) |
826 | #define ecb_unused ecb_attribute ((__unused__)) |
812 | #define ecb_const ecb_attribute ((__const__)) |
827 | #define ecb_const ecb_attribute ((__const__)) |
813 | #define ecb_pure ecb_attribute ((__pure__)) |
828 | #define ecb_pure ecb_attribute ((__pure__)) |
814 | |
829 | |
|
|
830 | /* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx __declspec(noreturn) */ |
815 | #if ECB_C11 |
831 | #if ECB_C11 |
816 | #define ecb_noreturn _Noreturn |
832 | #define ecb_noreturn _Noreturn |
817 | #else |
833 | #else |
818 | #define ecb_noreturn ecb_attribute ((__noreturn__)) |
834 | #define ecb_noreturn ecb_attribute ((__noreturn__)) |
819 | #endif |
835 | #endif |
… | |
… | |
2597 | { |
2613 | { |
2598 | invoke_cb = invoke_pending_cb; |
2614 | invoke_cb = invoke_pending_cb; |
2599 | } |
2615 | } |
2600 | |
2616 | |
2601 | void |
2617 | void |
2602 | ev_set_loop_release_cb (EV_P_ ev_loop_callback_nothrow release, ev_loop_callback_nothrow acquire) EV_THROW |
2618 | ev_set_loop_release_cb (EV_P_ ev_loop_callback release EV_THROW, ev_loop_callback acquire EV_THROW) EV_THROW |
2603 | { |
2619 | { |
2604 | release_cb = release; |
2620 | release_cb = release; |
2605 | acquire_cb = acquire; |
2621 | acquire_cb = acquire; |
2606 | } |
2622 | } |
2607 | #endif |
2623 | #endif |