summaryrefslogtreecommitdiff
path: root/src/vm/win32threadpool.cpp
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-04-20 03:57:28 +0200
committerKamil Rytarowski <n54@gmx.com>2016-04-20 04:07:31 +0200
commitaf0dda9713323f0a8729f2c653c81dc96c41701e (patch)
tree5936155c7e7ba7469b7f74418531ab85585f3306 /src/vm/win32threadpool.cpp
parentc3271f108c8db5747b7b0d20857ab0de3e3d0c09 (diff)
downloadcoreclr-af0dda9713323f0a8729f2c653c81dc96c41701e.tar.gz
coreclr-af0dda9713323f0a8729f2c653c81dc96c41701e.tar.bz2
coreclr-af0dda9713323f0a8729f2c653c81dc96c41701e.zip
Cast function pointer to void*
Fix issue building mscorlib.dll /home/kamil/tmp/coreclr/src/vm/win32threadpool.cpp:2672:13: error: no matching function for call to 'FireEtwThreadPoolIOEnqueue' FireEtwThreadPoolIOEnqueue((LPOVERLAPPED)waitInfo, Callback, (dwFlag & WAIT_SINGLE_EXECUTION) == 0, reinterpret_cast<void*>(GetClrInstanceId())); ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/kamil/tmp/coreclr/bin/obj/Linux.x64.Debug/src/inc/clretwallmain.h:972:14: note: candidate function not viable: no known conversion from 'WAITORTIMERCALLBACK' (aka 'void (*)(void *, unsigned char)') to 'const void *' for 2nd argument; take the address of the argument with & inline ULONG FireEtwThreadPoolIOEnqueue( ^ /home/kamil/tmp/coreclr/src/vm/win32threadpool.cpp:3236:13: error: no matching function for call to 'FireEtwThreadPoolIODequeue' FireEtwThreadPoolIODequeue(waitInfo, waitInfo->Callback, reinterpret_cast<void*>(GetClrInstanceId())); ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/kamil/tmp/coreclr/bin/obj/Linux.x64.Debug/src/inc/clretwallmain.h:985:14: note: candidate function not viable: no known conversion from 'WAITORTIMERCALLBACK' (aka 'void (*)(void *, unsigned char)') to 'const void *' for 2nd argument; take the address of the argument with & inline ULONG FireEtwThreadPoolIODequeue( ^ Reported on Ubuntu-14.04.2 LTS with clang 3.8.0
Diffstat (limited to 'src/vm/win32threadpool.cpp')
-rw-r--r--src/vm/win32threadpool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm/win32threadpool.cpp b/src/vm/win32threadpool.cpp
index fc25f4e7b9..0fa06db559 100644
--- a/src/vm/win32threadpool.cpp
+++ b/src/vm/win32threadpool.cpp
@@ -2669,7 +2669,7 @@ BOOL ThreadpoolMgr::RegisterWaitForSingleObject(PHANDLE phNewWaitObject,
// thread that will PostQueuedCompletionStatus (the dedicated WaitThread).
// This event correlates with ThreadPoolIODequeue in ThreadpoolMgr::AsyncCallbackCompletion
if (ETW_EVENT_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context, ThreadPoolIOEnqueue))
- FireEtwThreadPoolIOEnqueue((LPOVERLAPPED)waitInfo, Callback, (dwFlag & WAIT_SINGLE_EXECUTION) == 0, GetClrInstanceId());
+ FireEtwThreadPoolIOEnqueue((LPOVERLAPPED)waitInfo, reinterpret_cast<void*>(Callback), (dwFlag & WAIT_SINGLE_EXECUTION) == 0, GetClrInstanceId());
BOOL status = QueueUserAPC((PAPCFUNC)InsertNewWaitForSelf, threadCB->threadHandle, (size_t) waitInfo);
@@ -3233,7 +3233,7 @@ DWORD __stdcall ThreadpoolMgr::AsyncCallbackCompletion(PVOID pArgs)
// We fire the "dequeue" ETW event here, before executing the user code, to enable correlation with
// the ThreadPoolIOEnqueue fired in ThreadpoolMgr::RegisterWaitForSingleObject
if (ETW_EVENT_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_PROVIDER_Context, ThreadPoolIODequeue))
- FireEtwThreadPoolIODequeue(waitInfo, waitInfo->Callback, GetClrInstanceId());
+ FireEtwThreadPoolIODequeue(waitInfo, reinterpret_cast<void*>(waitInfo->Callback), GetClrInstanceId());
// the user callback can throw, the host must be prepared to handle it.
// SQL is ok, since they have a top-level SEH handler. However, there's