lwp: Fix stupid mistake in lock.h
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 7 Sep 2012 10:43:21 +0000 (11:43 +0100)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 7 Sep 2012 12:18:00 +0000 (05:18 -0700)
My earlier change to lock.h got the sense of the opr_Verify test wrong,
so we would assert() whenever the lock call succeeded. Fix this, so
things work again.

Change-Id: I7e2fda473343c7b541d6ca120ef0977adcf35f62
Reviewed-on: http://gerrit.openafs.org/8053
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

src/lwp/lock.h

index 051eabe..6261348 100644 (file)
@@ -45,8 +45,8 @@
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
 #include <afs/opr.h>
-#define LOCK_LOCK(A) opr_Verify(pthread_mutex_lock(&(A)->mutex));
-#define LOCK_UNLOCK(A) opr_Verify(pthread_mutex_unlock(&(A)->mutex));
+#define LOCK_LOCK(A) opr_Verify(pthread_mutex_lock(&(A)->mutex) == 0);
+#define LOCK_UNLOCK(A) opr_Verify(pthread_mutex_unlock(&(A)->mutex) == 0);
 #else /* AFS_PTHREAD_ENV */
 #define LOCK_LOCK(A)
 #define LOCK_UNLOCK(A)