diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2007-03-19 09:34:42 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2007-03-19 09:34:42 +0000 |
commit | f55d16fa21b0e87079c4075597c355251131ad16 (patch) | |
tree | ccc6f55cff57702d75775855378046eab6a815d1 | |
parent | 569b0bb3b92ca539da34d41d092deb8edb7a81ce (diff) | |
download | xen-f55d16fa21b0e87079c4075597c355251131ad16.tar.gz xen-f55d16fa21b0e87079c4075597c355251131ad16.tar.bz2 xen-f55d16fa21b0e87079c4075597c355251131ad16.zip |
minios: Various small fixes.
- Fixed type of variables in hypervisor.c.
- Fixed not removing a waiter from watch_queue.
- Make wait_for_watch() global accessible.
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
-rw-r--r-- | extras/mini-os/hypervisor.c | 4 | ||||
-rw-r--r-- | extras/mini-os/include/wait.h | 7 | ||||
-rw-r--r-- | extras/mini-os/include/xenbus.h | 1 | ||||
-rw-r--r-- | extras/mini-os/xenbus/xenbus.c | 3 |
4 files changed, 12 insertions, 3 deletions
diff --git a/extras/mini-os/hypervisor.c b/extras/mini-os/hypervisor.c index 2c2efa7e46..ed87845195 100644 --- a/extras/mini-os/hypervisor.c +++ b/extras/mini-os/hypervisor.c @@ -35,8 +35,8 @@ void do_hypervisor_callback(struct pt_regs *regs) { - u32 l1, l2; - unsigned int l1i, l2i, port; + unsigned long l1, l2, l1i, l2i; + unsigned int port; int cpu = 0; shared_info_t *s = HYPERVISOR_shared_info; vcpu_info_t *vcpu_info = &s->vcpu_info[cpu]; diff --git a/extras/mini-os/include/wait.h b/extras/mini-os/include/wait.h index f581db9109..d8338fbd8e 100644 --- a/extras/mini-os/include/wait.h +++ b/extras/mini-os/include/wait.h @@ -74,6 +74,13 @@ static inline void wake_up(struct wait_queue_head *head) local_irq_restore(flags); \ } while (0) +#define remove_waiter(w) do { \ + unsigned long flags; \ + local_irq_save(flags); \ + remove_wait_queue(&w); \ + local_irq_restore(flags); \ +} while (0) + #define wait_event(wq, condition) do{ \ unsigned long flags; \ if(condition) \ diff --git a/extras/mini-os/include/xenbus.h b/extras/mini-os/include/xenbus.h index 3866a8bbce..cd4e85d122 100644 --- a/extras/mini-os/include/xenbus.h +++ b/extras/mini-os/include/xenbus.h @@ -13,6 +13,7 @@ void init_xenbus(void); char *xenbus_read(xenbus_transaction_t xbt, const char *path, char **value); char *xenbus_watch_path(xenbus_transaction_t xbt, const char *path); +void wait_for_watch(void); char* xenbus_wait_for_value(const char*,const char*); /* Associates a value with a path. Returns a malloc'd error string on diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c index f483211947..9433b22b02 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -72,11 +72,12 @@ static void memcpy_from_ring(const void *Ring, memcpy(dest + c1, ring, c2); } -static inline void wait_for_watch(void) +void wait_for_watch(void) { DEFINE_WAIT(w); add_waiter(w,watch_queue); schedule(); + remove_waiter(w); wake(current); } |