diff options
author | rpj <rpj> | 2011-03-10 13:40:16 +0000 |
---|---|---|
committer | rpj <rpj> | 2011-03-10 13:40:16 +0000 |
commit | 6e3ac5c605d5062279178b3ea0b853d0e9cf7cc9 (patch) | |
tree | d9262f28ef4083dfeefbd31bc9b163cf67e102e1 /implement.h | |
parent | eb28d5aa00690b67cc27e4bd93d2c4c251987c85 (diff) |
Replace global Critical Sections with MCS Queue locks
Diffstat (limited to 'implement.h')
-rw-r--r-- | implement.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/implement.h b/implement.h index aaad665..1cd24f2 100644 --- a/implement.h +++ b/implement.h @@ -131,7 +131,8 @@ struct ptw32_thread_t_ #ifdef _UWIN DWORD dummy[5]; #endif - DWORD thread; + UINT64 seqNumber; /* Process-unique thread sequence number */ + DWORD thread; /* Win32 thread ID */ HANDLE threadH; /* Win32 thread handle - POSIX thread is invalid if threadH == 0 */ pthread_t ptHandle; /* This thread's permanent pthread_t handle */ ptw32_thread_t * prevReuse; /* Links threads on reuse stack */ @@ -535,12 +536,12 @@ extern int ptw32_concurrency; extern int ptw32_features; -extern CRITICAL_SECTION ptw32_thread_reuse_lock; -extern CRITICAL_SECTION ptw32_mutex_test_init_lock; -extern CRITICAL_SECTION ptw32_cond_list_lock; -extern CRITICAL_SECTION ptw32_cond_test_init_lock; -extern CRITICAL_SECTION ptw32_rwlock_test_init_lock; -extern CRITICAL_SECTION ptw32_spinlock_test_init_lock; +extern ptw32_mcs_lock_t ptw32_thread_reuse_lock; +extern ptw32_mcs_lock_t ptw32_mutex_test_init_lock; +extern ptw32_mcs_lock_t ptw32_cond_list_lock; +extern ptw32_mcs_lock_t ptw32_cond_test_init_lock; +extern ptw32_mcs_lock_t ptw32_rwlock_test_init_lock; +extern ptw32_mcs_lock_t ptw32_spinlock_test_init_lock; #ifdef _UWIN extern int pthread_count; |