From: Jeffrey Altman Date: Thu, 25 Sep 2008 12:50:58 +0000 (+0000) Subject: DEVEL15-rx-windows-mutex-is-mine-20080925 X-Git-Tag: openafs-devel-1_5_53~17 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9eaee9fa595ec41a25301667949cbe6dbe780cd6;p=packages%2Fo%2Fopenafs.git DEVEL15-rx-windows-mutex-is-mine-20080925 LICENSE MIT Add MUTEX_IS_MINE for Windows (cherry picked from commit db15c2f1cb6cf02ddf79e3539b6f202c439b92e0) --- diff --git a/src/rx/rx_pthread.h b/src/rx/rx_pthread.h index 6ae4af768..ff53183ed 100644 --- 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 */