Fix build breaks after GC update
authorJan Kotas <jkotas@microsoft.com>
Fri, 20 Nov 2015 04:31:33 +0000 (20:31 -0800)
committerJan Kotas <jkotas@microsoft.com>
Fri, 20 Nov 2015 09:38:13 +0000 (01:38 -0800)
src/gc/env/gcenv.windows.cpp
src/gc/gcee.cpp
src/gc/objecthandle.cpp
src/vm/gcenv.h

index 0882165..1059e5e 100644 (file)
 
 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)
@@ -51,12 +51,12 @@ void * _FastInterlockCompareExchangePointer(void * volatile *Destination, void *
 
 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);
 }
 
 
index 8270799..ad20009 100644 (file)
@@ -628,7 +628,7 @@ BOOL GCHeap::IsConcurrentGCInProgress()
 void gc_heap::fire_etw_allocation_event (size_t allocation_amount, int gen_number, uint8_t* object_address)
 {
     void * typeId = nullptr;
-    wchar_t * name = nullptr;
+    const WCHAR * name = nullptr;
 #ifdef FEATURE_REDHAWK
     typeId = RedhawkGCInterface::GetLastAllocEEType();
 #else
index 93cf38f..23a8d2b 100644 (file)
@@ -1735,14 +1735,14 @@ void Ref_ScanPointers(uint32_t condemned, uint32_t maxgen, ScanContext* sc, Ref_
                 {
                     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)
index 507c8d7..93d4185 100644 (file)
@@ -133,4 +133,20 @@ public:
     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_