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:
Scott R Charlton 2013-05-01 01:19:59 +00:00
parent 46d8c60d6d
commit e277acc3b4

View File

@ -25,14 +25,14 @@
/* 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_lock(m) while(InterlockedExchange(m, 1)) Sleep(0)
#define mutex_trylock(m) InterlockedExchange(m, 1)
#define mutex_unlock(m) InterlockedExchange(m, 0)
#define MUTEX_INITIALIZER 0
#define mutex_lock(m) while(InterlockedExchange(m, 1L)) Sleep(0)
#define mutex_trylock(m) InterlockedExchange(m, 1L)
#define mutex_unlock(m) InterlockedExchange(m, 0L)
#define MUTEX_INITIALIZER 0L
#else