git://git.openafs.org
/
openafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
9d63160
)
rx-windows-mutex-is-mine-20080925
author
Jeffrey Altman
<jaltman@secure-endpoints.com>
Thu, 25 Sep 2008 12:49:10 +0000 (12:49 +0000)
committer
Jeffrey Altman
<jaltman@secure-endpoints.com>
Thu, 25 Sep 2008 12:49:10 +0000 (12:49 +0000)
LICENSE MIT
Add MUTEX_IS_MINE for Windows
src/rx/rx_pthread.h
patch
|
blob
|
history
diff --git
a/src/rx/rx_pthread.h
b/src/rx/rx_pthread.h
index
6ae4af7
..
ff53183
100644
(file)
--- a/
src/rx/rx_pthread.h
+++ b/
src/rx/rx_pthread.h
@@
-34,7
+34,12
@@
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 */