X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fvnet%2Fvnet_host_interface.h;h=cef3047eb1140b6b128294e15d99d40aeaac0cff;hb=8ca1d3b4d7a7266a92ef99afeee99097da838ae8;hp=768cdd1c72f450b46a1054c1d5e53f53e8ffb96b;hpb=6774bce4f94af0884dcaf9e13075068e19dd845d;p=palacios.git diff --git a/palacios/include/vnet/vnet_host_interface.h b/palacios/include/vnet/vnet_host_interface.h index 768cdd1..cef3047 100644 --- a/palacios/include/vnet/vnet_host_interface.h +++ b/palacios/include/vnet/vnet_host_interface.h @@ -17,28 +17,35 @@ * redistribute, and modify it as specified in the file "V3VEE_LICENSE". */ -#ifndef __VNET_INTERFACE_H__ -#define __VNET_INTERFACE_H__ +#ifndef __VNET_HOST_INTERFACE_H__ +#define __VNET_HOST_INTERFACE_H__ -struct v3_thread { +struct vnet_thread { + void * host_thread; + void * data; }; -v3_thread * v3_thread_create(int (*func)(void *), void *arg, char * name); -void v3_thread_sleep(int cond); -void v3_thread_wakeup(v3_thread *); -void v3_thread_kill(v3_thread *); -void v3_thread_stop(v3_thread *); -void v3_thread_continue(v3_thread *); +struct vnet_timer { + void * host_timer; + void * data; +}; + +struct vnet_thread * vnet_thread_create(int (*func)(void *), void *arg, char * name); +void vnet_thread_sleep(int cond); +void vnet_thread_wakeup(struct vnet_thread *); +void vnet_thread_kill(struct vnet_thread *); +void vnet_thread_stop(struct vnet_thread *); +void vnet_thread_continue(struct vnet_thread *); -void udelay(unsigned long usecs); +void vnet_udelay(unsigned long usecs); // I know there is timer in palacios, but it has to be binded to specific VM, and the granularity is not // guaranteed // I need a timer that is global, not related to any specific VM, and also fine-granularity -v3_timer * v3_create_timer(int interval /*in us*/, void (*timer_fun)(uint64_t eclipsed_cycles, void * priv_data), void * pri_data); -int v3_del_timer(v3_timer *); -int v3_start_timer(v3_timer *); -int v3_stop_timer(v3_timer *); +struct vnet_timer * vnet_create_timer(int interval /*in us*/, void (*timer_fun)(uint64_t eclipsed_cycles, void * priv_data), void * pri_data); +int vnet_del_timer(struct vnet_timer *); +int vnet_start_timer(struct vnet_timer *); +int vnet_stop_timer(struct vnet_timer *); #endif