diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-11-20 01:19:07 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-11-20 01:19:07 +0100 |
commit | 36d28bb5c794d25f57fe31a0d89fb60ea48fdaa4 (patch) | |
tree | 840dc210c9946dbaef5079c8c9dd833cb4cc06cb /src | |
parent | e615f0a93a3063da2166029faaa8f5da9fe1308b (diff) | |
download | coreclr-36d28bb5c794d25f57fe31a0d89fb60ea48fdaa4.tar.gz coreclr-36d28bb5c794d25f57fe31a0d89fb60ea48fdaa4.tar.bz2 coreclr-36d28bb5c794d25f57fe31a0d89fb60ea48fdaa4.zip |
Fix few missing casts
Strangely enough, the build was successful locally, but not on the CI
machines.
Diffstat (limited to 'src')
-rw-r--r-- | src/gc/env/gcenv.base.h | 5 | ||||
-rw-r--r-- | src/gc/gc.cpp | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h index 0fb81e5d48..88821b14b5 100644 --- a/src/gc/env/gcenv.base.h +++ b/src/gc/env/gcenv.base.h @@ -28,6 +28,7 @@ typedef uint32_t BOOL; typedef uint32_t DWORD; typedef void* LPVOID; typedef uint32_t UINT; +typedef uintptr_t ULONG_PTR; typedef void VOID; typedef void* PVOID; typedef void * LPSECURITY_ATTRIBUTES; @@ -183,8 +184,8 @@ GetWriteWatch( PVOID lpBaseAddress, SIZE_T dwRegionSize, PVOID *lpAddresses, - uintptr_t * lpdwCount, - uint32_t * lpdwGranularity + ULONG_PTR * lpdwCount, + DWORD * lpdwGranularity ); WINBASEAPI diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp index 5a9b553834..13f4e4dcb8 100644 --- a/src/gc/gc.cpp +++ b/src/gc/gc.cpp @@ -1716,7 +1716,7 @@ static void enter_spin_lock (GCSpinLock* spin_lock) { retry: - if (FastInterlockExchange (&spin_lock->lock, 0) >= 0) + if (FastInterlockExchange ((LONG*)&spin_lock->lock, 0) >= 0) { unsigned int i = 0; while (spin_lock->lock >= 0) @@ -1767,7 +1767,7 @@ retry: inline BOOL try_enter_spin_lock(GCSpinLock* spin_lock) { - return (FastInterlockExchange (&spin_lock->lock, 0) < 0); + return (FastInterlockExchange ((LONG*)&spin_lock->lock, 0) < 0); } inline @@ -9161,7 +9161,7 @@ void gc_heap::update_card_table_bundle() dprintf (3,("Probing card table pages [%Ix, %Ix[", (size_t)base_address, (size_t)base_address+region_size)); uint32_t status = GetWriteWatch (0, base_address, region_size, (void**)g_addresses, - &bcount, (DWORD*)&granularity); + (ULONG_PTR*)&bcount, (DWORD*)&granularity); assert (status == 0); assert (granularity == OS_PAGE_SIZE); dprintf (3,("Found %d pages written", bcount)); @@ -18424,7 +18424,7 @@ void gc_heap::fix_card_table () #endif //TIME_WRITE_WATCH uint32_t status = GetWriteWatch (mode, base_address, region_size, (void**)g_addresses, - &bcount, (DWORD*)&granularity); + (ULONG_PTR*)&bcount, (DWORD*)&granularity); assert (status == 0); #ifdef TIME_WRITE_WATCH @@ -26157,7 +26157,7 @@ void gc_heap::revisit_written_pages (BOOL concurrent_p, BOOL reset_only_p) uint32_t status = GetWriteWatch (mode, base_address, region_size, (void**)background_written_addresses, - &bcount, (DWORD*)&granularity); + (ULONG_PTR*)&bcount, (DWORD*)&granularity); //#ifdef _DEBUG if (status != 0) |