Verify, not Assert, for the (util) global mutex
[openafs.git] / src / util / pthread_glock.h
index a419684..e323e3f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
- * 
+ *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
@@ -12,7 +12,7 @@
 
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
-#include <assert.h>
+#include <afs/opr.h>
 
 typedef struct {
     pthread_mutex_t mut;
@@ -35,15 +35,13 @@ extern int pthread_recursive_mutex_lock(pthread_recursive_mutex_p);
 extern int pthread_recursive_mutex_unlock(pthread_recursive_mutex_p);
 
 #define LOCK_GLOBAL_MUTEX \
-    assert(pthread_recursive_mutex_lock(&grmutex)==0)
+    opr_Verify(pthread_recursive_mutex_lock(&grmutex)==0)
 
 #define UNLOCK_GLOBAL_MUTEX \
-    assert(pthread_recursive_mutex_unlock(&grmutex)==0)
+    opr_Verify(pthread_recursive_mutex_unlock(&grmutex)==0)
 
 #else
 
-#include <syslog.h>
-
 #define LOCK_GLOBAL_MUTEX
 #define UNLOCK_GLOBAL_MUTEX