diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-01-31 19:45:13 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-01-31 19:45:13 +0000 |
commit | dea8eefd6214e3ad5b54795fa958ab721d58710c (patch) | |
tree | f210aa8b10d18345ea90980eef13ea0c6a2665ee /extras/mini-os/h | |
parent | f21e4de207c89ca1f1d18122c43db30b2ff41e7b (diff) | |
download | xen-dea8eefd6214e3ad5b54795fa958ab721d58710c.tar.gz xen-dea8eefd6214e3ad5b54795fa958ab721d58710c.tar.bz2 xen-dea8eefd6214e3ad5b54795fa958ab721d58710c.zip |
bitkeeper revision 1.699 (401c05c9TV2zsaZ_e3zpy-zaKxCetw)
timer.c, timer.h, sched.h:
new file
Many files:
Rolf's new timer interface, plus various cleanups.
Diffstat (limited to 'extras/mini-os/h')
-rw-r--r-- | extras/mini-os/h/hypervisor.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/extras/mini-os/h/hypervisor.h b/extras/mini-os/h/hypervisor.h index a4f5625692..92bb37cdd2 100644 --- a/extras/mini-os/h/hypervisor.h +++ b/extras/mini-os/h/hypervisor.h @@ -1,3 +1,10 @@ +/****************************************************************************** + * hypervisor.h + * + * Linux-specific hypervisor handling. + * + * Copyright (c) 2002, K A Fraser + */ #ifndef _HYPERVISOR_H_ #define _HYPERVISOR_H_ @@ -135,6 +142,17 @@ static __inline__ int HYPERVISOR_yield(void) return ret; } +static __inline__ int HYPERVISOR_block(void) +{ + int ret; + __asm__ __volatile__ ( + TRAP_INSTR + : "=a" (ret) : "0" (__HYPERVISOR_sched_op), + "b" (SCHEDOP_block) ); + + return ret; +} + static __inline__ int HYPERVISOR_exit(void) { int ret; @@ -146,13 +164,25 @@ static __inline__ int HYPERVISOR_exit(void) return ret; } -static __inline__ int HYPERVISOR_stop(void) +static __inline__ int HYPERVISOR_stop(unsigned long srec) { int ret; + /* NB. On suspend, control software expects a suspend record in %esi. */ __asm__ __volatile__ ( TRAP_INSTR : "=a" (ret) : "0" (__HYPERVISOR_sched_op), - "b" (SCHEDOP_stop) ); + "b" (SCHEDOP_stop), "S" (srec) : "memory" ); + + return ret; +} + +static __inline__ long HYPERVISOR_set_dom_timer(void *timer_arg) +{ + int ret; + __asm__ __volatile__ ( + TRAP_INSTR + : "=a" (ret) : "0" (__HYPERVISOR_set_dom_timer), + "b" (timer_arg) : "memory" ); return ret; } |