1 /**************************************************************************** 2 * schedule.c 3 * 4 */ 5 6 #ifndef __COMMON_SCHED_COMPAT_C__ 7 #define __COMMON_SCHED_COMPAT_C__ 8 9 10 #include <compat/sched.h> 11 12 #define COMPAT 13 #define ret_t int 14 15 #define do_sched_op compat_sched_op 16 17 #define xen_sched_pin_override sched_pin_override 18 CHECK_sched_pin_override; 19 #undef xen_sched_pin_override 20 21 #define xen_sched_shutdown sched_shutdown 22 CHECK_sched_shutdown; 23 #undef xen_sched_shutdown 24 25 #define xen_sched_remote_shutdown sched_remote_shutdown 26 CHECK_sched_remote_shutdown; 27 #undef xen_sched_remote_shutdown 28 compat_poll(const struct compat_sched_poll * compat)29static int compat_poll(const struct compat_sched_poll *compat) 30 { 31 struct sched_poll native; 32 33 #define XLAT_sched_poll_HNDL_ports(_d_, _s_) \ 34 guest_from_compat_handle((_d_)->ports, (_s_)->ports) 35 XLAT_sched_poll(&native, compat); 36 #undef XLAT_sched_poll_HNDL_ports 37 38 return do_poll(&native); 39 } 40 41 #define do_poll compat_poll 42 #define sched_poll compat_sched_poll 43 44 #include "core.c" 45 compat_set_timer_op(uint32_t lo,uint32_t hi)46int compat_set_timer_op(uint32_t lo, uint32_t hi) 47 { 48 return do_set_timer_op(((uint64_t)hi << 32) | lo); 49 } 50 51 #endif /* __COMMON_SCHED_COMPAT_C__ */ 52 53 /* 54 * Local variables: 55 * mode: C 56 * c-file-style: "BSD" 57 * c-basic-offset: 4 58 * tab-width: 4 59 * indent-tabs-mode: nil 60 * End: 61 */ 62