diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-11-30 09:32:27 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-11-30 09:32:27 +0000 |
commit | 5088edf797252b470d1e74f9125fae29fc026911 (patch) | |
tree | 8a410432b43e3486e334af8d09ddbe29cd36d99f /extras/mini-os/include/x86 | |
parent | e71632467f29cbb214f50352ee6216da8c1a7cab (diff) | |
download | xen-5088edf797252b470d1e74f9125fae29fc026911.tar.gz xen-5088edf797252b470d1e74f9125fae29fc026911.tar.bz2 xen-5088edf797252b470d1e74f9125fae29fc026911.zip |
[minios] Add xenbus shutdown control support
Add a thread watching the xenbus shutdown control path and notifies a
wait queue.
Add HYPERVISOR_shutdown convenient inline for minios shutdown.
Add proper shutdown to the minios test application.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'extras/mini-os/include/x86')
-rw-r--r-- | extras/mini-os/include/x86/x86_32/hypercall-x86_32.h | 8 | ||||
-rw-r--r-- | extras/mini-os/include/x86/x86_64/hypercall-x86_64.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h index 43028eea0a..ef52ecdd8f 100644 --- a/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h +++ b/extras/mini-os/include/x86/x86_32/hypercall-x86_32.h @@ -172,6 +172,14 @@ HYPERVISOR_sched_op( return _hypercall2(int, sched_op, cmd, arg); } +static inline int +HYPERVISOR_shutdown( + unsigned int reason) +{ + struct sched_shutdown shutdown = { .reason = reason }; + return _hypercall2(int, sched_op, SCHEDOP_shutdown, &shutdown); +} + static inline long HYPERVISOR_set_timer_op( uint64_t timeout) diff --git a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h index b874f039fe..513d74e09f 100644 --- a/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h +++ b/extras/mini-os/include/x86/x86_64/hypercall-x86_64.h @@ -176,6 +176,14 @@ HYPERVISOR_sched_op( return _hypercall2(int, sched_op, cmd, arg); } +static inline int +HYPERVISOR_shutdown( + unsigned int reason) +{ + struct sched_shutdown shutdown = { .reason = reason }; + return _hypercall2(int, sched_op, SCHEDOP_shutdown, &shutdown); +} + static inline long HYPERVISOR_set_timer_op( uint64_t timeout) |