ia64/xen-unstable

view xen/common/compat/schedule.c @ 17062:0769835cf50f

x86 shadow: Reduce scope of shadow lock.

emulate_map_dest doesn't require holding lock, since
only shadow related operation possibly involved is to
remove shadow which is less frequent and can acquire
lock inside. Rest are either guest table walk or
per-vcpu monitor table manipulation

Signed-off-by Kevin Tian <kevin.tian@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 14 10:33:12 2008 +0000 (2008-02-14)
parents 883c0080dd05
children
line source
1 /****************************************************************************
2 * schedule.c
3 *
4 */
6 #include <compat/sched.h>
8 #define COMPAT
9 #define ret_t int
11 #define do_sched_op compat_sched_op
13 #define xen_sched_shutdown sched_shutdown
14 CHECK_sched_shutdown;
15 #undef xen_sched_shutdown
17 #define xen_sched_remote_shutdown sched_remote_shutdown
18 CHECK_sched_remote_shutdown;
19 #undef xen_sched_remote_shutdown
21 static int compat_poll(struct compat_sched_poll *compat)
22 {
23 struct sched_poll native;
25 #define XLAT_sched_poll_HNDL_ports(_d_, _s_) \
26 guest_from_compat_handle((_d_)->ports, (_s_)->ports)
27 XLAT_sched_poll(&native, compat);
28 #undef XLAT_sched_poll_HNDL_ports
30 return do_poll(&native);
31 }
33 #define do_poll compat_poll
34 #define sched_poll compat_sched_poll
36 #include "../schedule.c"
38 int compat_set_timer_op(u32 lo, s32 hi)
39 {
40 return do_set_timer_op(((s64)hi << 32) | lo);
41 }
43 /*
44 * Local variables:
45 * mode: C
46 * c-set-style: "BSD"
47 * c-basic-offset: 4
48 * tab-width: 4
49 * indent-tabs-mode: nil
50 * End:
51 */