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.


format fix
Lei Xia [Fri, 6 May 2011 01:58:32 +0000 (20:58 -0500)]
palacios/include/vnet/vnet.h
palacios/include/vnet/vnet_host.h

index 710ad9d..3bc1344 100644 (file)
@@ -1,3 +1,4 @@
+
 /* 
  * This file is part of the Palacios Virtual Machine Monitor developed
  * by the V3VEE Project with funding from the United States National 
index f237417..60a2861 100644 (file)
@@ -35,13 +35,19 @@ typedef unsigned long vnet_lock_t;
 
 
 struct vnet_host_hooks {
-    void *(*thread_start)(int (*fn)(void * arg), void * arg, char * thread_name);
+    void *(*thread_start)(int (*fn)(void * arg), 
+                         void * arg, 
+                         char * thread_name);
+
     void (*thread_sleep)(long timeout);
     void (*thread_wakeup)(void * thread);
     void (*thread_stop)(void * thread);
     int (*thread_should_stop)(void);
 
-    void *(*timer_create)(unsigned long interval, void (* timer_fun)(void * priv_data), void * data);
+    void *(*timer_create)(unsigned long interval, 
+                         void (* timer_fun)(void * priv_data), 
+                         void * data);
+
     void (*timer_del)(void * timer);
     void (*timer_start)(void * timer);
     void (*timer_stop)(void * timer);
@@ -133,7 +139,8 @@ static inline void Vnet_Yield(void){
 }
 
 /* THREAD FUNCTIONS */
-struct vnet_thread * vnet_start_thread(int (*func)(void *), void * arg, char * name);
+struct vnet_thread * vnet_start_thread(int (*func)(void *), 
+                                      void * arg, char * name);
 
 static inline void vnet_thread_sleep(long timeout){
     if((host_hooks) && host_hooks->thread_sleep){
@@ -170,7 +177,9 @@ static inline void  vnet_udelay(unsigned long usecs){
 
 /* TIMER FUNCTIONS */
 /* interval, in jittes */
-struct vnet_timer * vnet_create_timer(unsigned long interval, void (* timer_fun)(void * priv_data), void * pri_data);
+struct vnet_timer * vnet_create_timer(unsigned long interval, 
+                                     void (* timer_fun)(void * priv_data), 
+                                     void * pri_data);
 
 static inline void vnet_del_timer(struct vnet_timer * timer){
     if((host_hooks) && host_hooks->timer_del){
@@ -191,7 +200,8 @@ static inline void vnet_stop_timer(struct vnet_timer * timer){
     }
 }
 
-static inline void vnet_reset_timer(struct vnet_timer * timer, unsigned long new_interval){
+static inline void vnet_reset_timer(struct vnet_timer * timer, 
+                                   unsigned long new_interval){
     if((host_hooks) && host_hooks->timer_reset){
        host_hooks->timer_reset(timer->host_timer, new_interval);
     }
@@ -200,23 +210,23 @@ static inline void vnet_reset_timer(struct vnet_timer * timer, unsigned long new
 
 
 #define Vnet_Print(level, fmt, args...)                                        \
-    do {       \
-       extern int vnet_debug;  \
-       if(level <= vnet_debug) {   \
+    do {                                                               \
+       extern int vnet_debug;                                          \
+       if(level <= vnet_debug) {                                       \
            extern struct vnet_host_hooks * host_hooks;                 \
            if ((host_hooks) && (host_hooks)->print) {                  \
                (host_hooks)->print((fmt), ##args);                     \
-           }                                                   \
-       }                                                       \
+           }                                                           \
+       }                                                               \
     } while (0)        
 
 
 #define Vnet_Debug(fmt, args...)                                       \
-    do {       \
+    do {                                                               \
            extern struct vnet_host_hooks * host_hooks;                 \
            if ((host_hooks) && (host_hooks)->print) {                  \
                (host_hooks)->print((fmt), ##args);                     \
-           }                                                                                           \
+           }                                                           \
     } while (0)        
 
 
@@ -251,7 +261,7 @@ static inline void vnet_unlock_irqrestore(vnet_lock_t lock, addr_t irq_state) {
 }
 
 #endif
-\r
+
 
 void init_vnet(struct vnet_host_hooks * hooks);