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.


code clean up
[palacios.git] / palacios / include / palacios / vmm.h
index 8e64a04..7d8e69c 100644 (file)
 #endif
 
 
-#define V3_AllocPages(ptr, num_pages)                  \
-  do {                                                 \
+#define V3_AllocPages(num_pages)                       \
+  ({                                                   \
     extern struct vmm_os_hooks * os_hooks;             \
-    ptr = 0;                                           \
+    void * ptr = 0;                                    \
     if ((os_hooks) && (os_hooks)->allocate_pages) {    \
       ptr = (os_hooks)->allocate_pages(num_pages);     \
     }                                                  \
-  } while (0)                                          \
+    ptr;                                               \
+  })                                                   \
 
 
 #define V3_FreePage(page)                      \