#ifndef _RTYPES_H_
#define _RTYPES_H_
+#include <windows.h>
/*
* Architecture dependent types. These types have to be redifined
typedef unsigned long long ruint64;
typedef unsigned long rsize_t;
typedef signed long rssize_t;
-typedef unsigned int ratomic_t;
+typedef unsigned long ratomic_t;
typedef unsigned long rword;
typedef long rsword;
* Atomic operations (Architecture Dependent)
*/
#define R_ATOMIC_CMPXCHG(ptr, oldval, newval, resptr) \
- do { } while (0)
+ do { InterlockedCompareExchange (ptr, newval, oldval); *resptr = *ptr; } while (0)
#define R_ATOMIC_XCHG(ptr, val) \
- do { } while (0)
+ do { val = InterlockedExchange (ptr, val); } while (0)
#define R_ATOMIC_ADD(ptr, val) \
- do { } while (0)
+ do { InterlockedExchangeAdd (ptr, val); } while (0)
#define R_ATOMIC_SUB(ptr, val) \
- do { } while (0)
+ do { InterlockedExchangeAdd (ptr, -val); } while (0)
#define R_DEBUG_BRAKE do { __asm int 3 } while (0)
!ELSEIF "$(CFG)" == "debug"
OUTDIR=.\out
-CPP_FLAGS=/nologo $(INCLUDE_DIRS) /Zp1 /Zi /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /Fo"$(OUTDIR)\\" /FD /c
+CPP_FLAGS=/nologo $(INCLUDE_DIRS) /Zp1 /Zi /W3 /EHsc /Od /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "R_DEBUG_MEMALLOC" /D "_CONSOLE" /Fo"$(OUTDIR)\\" /FD /c
!ENDIF