int32_t FastInterlockIncrement(int32_t volatile *lpAddend)
{
- return InterlockedIncrement((int32_t *)lpAddend);
+ return InterlockedIncrement((LONG *)lpAddend);
}
int32_t FastInterlockDecrement(int32_t volatile *lpAddend)
{
- return InterlockedDecrement((int32_t *)lpAddend);
+ return InterlockedDecrement((LONG *)lpAddend);
}
int32_t FastInterlockExchange(int32_t volatile *Target, int32_t Value)
{
- return InterlockedExchange((int32_t *)Target, Value);
+ return InterlockedExchange((LONG *)Target, Value);
}
int32_t FastInterlockCompareExchange(int32_t volatile *Destination, int32_t Exchange, int32_t Comperand)
{
- return InterlockedCompareExchange((int32_t *)Destination, Exchange, Comperand);
+ return InterlockedCompareExchange((LONG *)Destination, Exchange, Comperand);
}
int32_t FastInterlockExchangeAdd(int32_t volatile *Addend, int32_t Value)
{
- return InterlockedExchangeAdd((int32_t *)Addend, Value);
+ return InterlockedExchangeAdd((LONG *)Addend, Value);
}
void * _FastInterlockExchangePointer(void * volatile *Target, void * Value)
void FastInterlockOr(uint32_t volatile *p, uint32_t msk)
{
- InterlockedOr((int32_t volatile *)p, msk);
+ InterlockedOr((LONG volatile *)p, msk);
}
void FastInterlockAnd(uint32_t volatile *p, uint32_t msk)
{
- InterlockedAnd((int32_t volatile *)p, msk);
+ InterlockedAnd((LONG volatile *)p, msk);
}
{
HHANDLETABLE hTable = walk->pBuckets[i]->pTable[uCPUindex];
if (hTable)
- HndScanHandlesForGC(hTable, &ScanPointer, LPARAM(sc), LPARAM(fn), types, _countof(types), condemned, maxgen, flags);
+ HndScanHandlesForGC(hTable, &ScanPointer, uintptr_t(sc), uintptr_t(fn), types, _countof(types), condemned, maxgen, flags);
}
}
}
}
// enumerate pointers in variable handles whose dynamic type is VHT_WEAK_SHORT, VHT_WEAK_LONG or VHT_STRONG
- TraceVariableHandlesBySingleThread(&ScanPointer, LPARAM(sc), LPARAM(fn), VHT_WEAK_SHORT | VHT_WEAK_LONG | VHT_STRONG, condemned, maxgen, flags);
+ TraceVariableHandlesBySingleThread(&ScanPointer, uintptr_t(sc), uintptr_t(fn), VHT_WEAK_SHORT | VHT_WEAK_LONG | VHT_STRONG, condemned, maxgen, flags);
}
void Ref_UpdatePinnedPointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_promote_func* fn)
static Thread * GetThreadList(Thread * pThread);
};
-#endif // GCENV_H_
\ No newline at end of file
+#define GCMemoryStatus MEMORYSTATUSEX
+
+#define CLR_MUTEX_COOKIE MUTEX_COOKIE
+
+namespace ETW
+{
+ typedef enum _GC_ROOT_KIND {
+ GC_ROOT_STACK = 0,
+ GC_ROOT_FQ = 1,
+ GC_ROOT_HANDLES = 2,
+ GC_ROOT_OLDER = 3,
+ GC_ROOT_SIZEDREF = 4,
+ GC_ROOT_OVERFLOW = 5
+ } GC_ROOT_KIND;
+};
+
+#endif // GCENV_H_