mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
updated thread.h to compile w/ VS2005
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@7667 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
46d8c60d6d
commit
e277acc3b4
12
src/thread.h
12
src/thread.h
@ -25,14 +25,14 @@
|
|||||||
|
|
||||||
/* This is simplified spinlock version */
|
/* This is simplified spinlock version */
|
||||||
|
|
||||||
typedef volatile unsigned int mutex_t;
|
typedef LONG volatile mutex_t;
|
||||||
|
|
||||||
#define mutex_init(m) InterlockedExchange(m, 0)
|
#define mutex_init(m) InterlockedExchange(m, 0L)
|
||||||
#define mutex_delete(m)
|
#define mutex_delete(m)
|
||||||
#define mutex_lock(m) while(InterlockedExchange(m, 1)) Sleep(0)
|
#define mutex_lock(m) while(InterlockedExchange(m, 1L)) Sleep(0)
|
||||||
#define mutex_trylock(m) InterlockedExchange(m, 1)
|
#define mutex_trylock(m) InterlockedExchange(m, 1L)
|
||||||
#define mutex_unlock(m) InterlockedExchange(m, 0)
|
#define mutex_unlock(m) InterlockedExchange(m, 0L)
|
||||||
#define MUTEX_INITIALIZER 0
|
#define MUTEX_INITIALIZER 0L
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user