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.


Cleanup of linkage issues for non-Linux hosts
[palacios.git] / linux_module / iface-packet.c
index 90a72bc..6ec4de0 100644 (file)
@@ -253,9 +253,9 @@ palacios_packet_connect(struct v3_packet * packet,
     struct raw_interface * iface;
     unsigned long flags;
     
-    spin_lock_irqsave(&(packet_state.lock), flags);
+    palacios_spinlock_lock_irqsave(&(packet_state.lock), flags);
     iface = find_interface(host_nic);
-    spin_unlock_irqrestore(&(packet_state.lock),flags);
+    palacios_spinlock_unlock_irqrestore(&(packet_state.lock),flags);
 
     if(iface == NULL){
        iface = (struct raw_interface *)palacios_alloc(sizeof(struct raw_interface));
@@ -268,9 +268,9 @@ palacios_packet_connect(struct v3_packet * packet,
            palacios_free(iface);
            return -1;
        }
-       spin_lock_irqsave(&(packet_state.lock), flags); 
+       palacios_spinlock_lock_irqsave(&(packet_state.lock), flags);    
        list_add(&(iface->node), &(packet_state.open_interfaces));
-       spin_unlock_irqrestore(&(packet_state.lock),flags);
+       palacios_spinlock_unlock_irqrestore(&(packet_state.lock),flags);
     }
     
     packet->host_packet_data = iface;
@@ -346,7 +346,7 @@ static int packet_init( void ) {
     V3_Init_Packet(&palacios_packet_hooks);
     
     memset(&packet_state, 0, sizeof(struct palacios_packet_state));
-    spin_lock_init(&(packet_state.lock));
+    palacios_spinlock_init(&(packet_state.lock));
     INIT_LIST_HEAD(&(packet_state.open_interfaces));
     
     // REGISTER GLOBAL CONTROL to add interfaces...
@@ -361,6 +361,8 @@ static int packet_deinit( void ) {
        deinit_raw_interface(iface);
        palacios_free(iface);
     }
+
+    palacios_spinlock_deinit(&(packet_state.lock));
     
     return 0;
 }