]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-rx-windows-mutex-is-mine-20080925
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 25 Sep 2008 12:50:58 +0000 (12:50 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 25 Sep 2008 12:50:58 +0000 (12:50 +0000)
LICENSE MIT

Add MUTEX_IS_MINE for Windows

(cherry picked from commit db15c2f1cb6cf02ddf79e3539b6f202c439b92e0)

src/rx/rx_pthread.h

index 6ae4af7684892542ea878041b0b90e242dd209bd..ff53183ed19597e2586ffd4f31c8c62c4c8bff4c 100644 (file)
 
 typedef pthread_mutex_t afs_kmutex_t;
 typedef pthread_cond_t afs_kcondvar_t;
-#define MUTEX_ISMINE
+#ifdef RX_ENABLE_LOCKS
+#define MUTEX_ISMINE(l) (pthread_mutex_trylock(l) == EDEADLK)
+#else
+#define MUTEX_ISMINE(l) (1)
+#endif
+
 #define pthread_yield() Sleep(0)
 
 #else /* AFS_NT40_ENV */