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.


added NUMA query support for Linux to allow Palacios to determine the NUMA layout...
[palacios.git] / linux_module / palacios-stubs.c
index 4bceb8c..a7f1607 100644 (file)
@@ -711,8 +711,10 @@ palacios_mutex_free(void * mutex) {
  */
 void 
 palacios_mutex_lock(void * mutex, int must_spin) {
+
+    LOCKCHECK_LOCK_PRE(mutex);
     spin_lock((spinlock_t *)mutex);
-    LOCKCHECK_LOCK(mutex);
+    LOCKCHECK_LOCK_POST(mutex);
 }
 
 
@@ -724,8 +726,9 @@ palacios_mutex_lock_irqsave(void * mutex, int must_spin) {
     
     unsigned long flags; 
     
+    LOCKCHECK_LOCK_IRQSAVE_PRE(mutex,flags);
     spin_lock_irqsave((spinlock_t *)mutex,flags);
-    LOCKCHECK_LOCK_IRQSAVE(mutex,flags);
+    LOCKCHECK_LOCK_IRQSAVE_POST(mutex,flags);
 
     return (void *)flags;
 }
@@ -739,8 +742,9 @@ palacios_mutex_unlock(
        void *                  mutex
 ) 
 {
+    LOCKCHECK_UNLOCK_PRE(mutex);
     spin_unlock((spinlock_t *)mutex);
-    LOCKCHECK_UNLOCK(mutex);
+    LOCKCHECK_UNLOCK_POST(mutex);
 }
 
 
@@ -750,9 +754,10 @@ palacios_mutex_unlock(
 void 
 palacios_mutex_unlock_irqrestore(void *mutex, void *flags)
 {
+    LOCKCHECK_UNLOCK_IRQRESTORE_PRE(mutex,(unsigned long)flags);
     // This is correct, flags is opaque
     spin_unlock_irqrestore((spinlock_t *)mutex,(unsigned long)flags);
-    LOCKCHECK_UNLOCK_IRQRESTORE(mutex,(unsigned long)flags);
+    LOCKCHECK_UNLOCK_IRQRESTORE_POST(mutex,(unsigned long)flags);
 }
 
 /**