Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


fix the threads function calls using new vnet host interfaces
[palacios.git] / palacios / include / vnet / vnet_host_interface.h
1 /* 
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu> 
11  * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author: Lei Xia <lxia@northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20 #ifndef __VNET_HOST_INTERFACE_H__
21 #define __VNET_HOST_INTERFACE_H__
22
23 struct vnet_thread {
24     void * host_thread;
25     void * data;
26 };
27
28 struct vnet_timer {
29     void * host_timer;
30     void * data;
31 };
32
33 struct vnet_thread * vnet_thread_create(int (*func)(void *), void *arg, char * name);
34 void vnet_thread_sleep(int cond);
35 void vnet_thread_wakeup(struct vnet_thread *);
36 void vnet_thread_kill(struct vnet_thread *);
37 void vnet_thread_stop(struct vnet_thread *);
38 void vnet_thread_continue(struct vnet_thread *);
39
40 void vnet_udelay(unsigned long usecs);
41
42 // I know there is timer in palacios, but it has to be binded to specific VM, and the granularity is not
43 // guaranteed
44 // I need a timer that is global, not related to any specific VM, and also fine-granularity
45 struct vnet_timer * vnet_create_timer(int interval /*in us*/, void (*timer_fun)(uint64_t eclipsed_cycles, void * priv_data), void * pri_data);
46 int vnet_del_timer(struct vnet_timer *);
47 int vnet_start_timer(struct vnet_timer *);
48 int vnet_stop_timer(struct vnet_timer *);
49
50
51 #endif
52
53