suppress some compilation warnings when using spinlock
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Mar 2012 21:20:52 +0000 (16:20 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Mar 2012 21:20:52 +0000 (16:20 -0500)
src/arch/util/machine-smp.c

index 6d618960652db45b8b0ae246bd4f0b340e73f049..1f94e81716ad6176fefa27263fe381f968301921 100644 (file)
@@ -309,7 +309,7 @@ CmiNodeLock CmiCreateLock()
 void CmiDestroyLock(CmiNodeLock lk)
 {
   pthread_spin_destroy(lk);
-  free(lk);
+  free((void*)lk);
 }
 #else
 CmiNodeLock CmiCreateLock()
@@ -492,8 +492,8 @@ static void CmiStartThreads(char **argv)
 
 static void CmiDestoryLocks()
 {
-  pthread_mutex_destroy(comm_mutex);
-  pthread_mutex_destroy(CmiMemLock_lock);
+  CmiDestroyLock(comm_mutex);
+  CmiDestroyLock(CmiMemLock_lock);
   CmiMemLock_lock = 0;
   pthread_mutex_destroy(&barrier_mutex);
 #ifdef CMK_NO_ASM_AVAILABLE