Implementing (maybe working) Win32 memory.cc.
This commit is contained in:
4
third_party/dlmalloc/malloc.c.h
vendored
4
third_party/dlmalloc/malloc.c.h
vendored
@@ -1853,8 +1853,8 @@ static FORCEINLINE void x86_clear_lock(int* sl) {
|
||||
#define CLEAR_LOCK(sl) x86_clear_lock(sl)
|
||||
|
||||
#else /* Win32 MSC */
|
||||
#define CAS_LOCK(sl) interlockedexchange(sl, (LONG)1)
|
||||
#define CLEAR_LOCK(sl) interlockedexchange (sl, (LONG)0)
|
||||
#define CAS_LOCK(sl) interlockedexchange((volatile unsigned int*)sl, 1)
|
||||
#define CLEAR_LOCK(sl) interlockedexchange((volatile unsigned int*)sl, 0)
|
||||
|
||||
#endif /* ... gcc spins locks ... */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user