summaryrefslogtreecommitdiff
path: root/src/vm/comwaithandle.cpp
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2019-02-15 00:02:20 +0100
committerJan Kotas <jkotas@microsoft.com>2019-02-14 15:02:20 -0800
commit89e78f42ba11beaa81635a75cf593a3713dba176 (patch)
tree0455b36a0192008673743f97ce80214c9a0c778e /src/vm/comwaithandle.cpp
parent6c9ad257e78977c9fd5d2429490b5d2f72c1b612 (diff)
downloadcoreclr-89e78f42ba11beaa81635a75cf593a3713dba176.tar.gz
coreclr-89e78f42ba11beaa81635a75cf593a3713dba176.tar.bz2
coreclr-89e78f42ba11beaa81635a75cf593a3713dba176.zip
Remove unnecessary fields from WaitHandle (#22593)
* Remove unnecessary fields from WaitHandle * Drop volatile from _waitHandle * Address race condition in unmanaged code * Remove unused hasThreadAffinity parameters * Fix FCDECL argument counts
Diffstat (limited to 'src/vm/comwaithandle.cpp')
-rw-r--r--src/vm/comwaithandle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vm/comwaithandle.cpp b/src/vm/comwaithandle.cpp
index 48dab31fcd..abb1daf16b 100644
--- a/src/vm/comwaithandle.cpp
+++ b/src/vm/comwaithandle.cpp
@@ -157,7 +157,7 @@ INT64 AdditionalWait(INT64 sPauseTime, INT64 sTime, INT64 expDuration)
return additional;
}
-FCIMPL4(INT32, WaitHandleNative::CorWaitOneNative, SafeHandle* safeWaitHandleUNSAFE, INT32 timeout, CLR_BOOL hasThreadAffinity, CLR_BOOL exitContext)
+FCIMPL3(INT32, WaitHandleNative::CorWaitOneNative, SafeHandle* safeWaitHandleUNSAFE, INT32 timeout, CLR_BOOL exitContext)
{
FCALL_CONTRACT;
@@ -235,10 +235,10 @@ FCIMPL4(INT32, WaitHandleNative::CorWaitMultipleNative, Object* waitObjectsUNSAF
WAITHANDLEREF waitObject = (WAITHANDLEREF) pWaitObjects->m_Array[i];
_ASSERTE(waitObject != NULL);
- //If the size of the array is 1 and m_handle is INVALID_HANDLE then WaitForMultipleObjectsEx will
+ //If the size of the array is 1 and handle is INVALID_HANDLE_VALUE then WaitForMultipleObjectsEx will
// return ERROR_INVALID_HANDLE but DoAppropriateWait will convert to WAIT_OBJECT_0. i.e Success,
// this behavior seems wrong but someone explicitly coded that condition so it must have been for a reason.
- internalHandles[i] = waitObject->m_handle;
+ internalHandles[i] = waitObject->GetWaitHandle();
}
@@ -266,7 +266,7 @@ FCIMPL4(INT32, WaitHandleNative::CorWaitMultipleNative, Object* waitObjectsUNSAF
}
FCIMPLEND
-FCIMPL5(INT32, WaitHandleNative::CorSignalAndWaitOneNative, SafeHandle* safeWaitHandleSignalUNSAFE,SafeHandle* safeWaitHandleWaitUNSAFE, INT32 timeout, CLR_BOOL hasThreadAffinity, CLR_BOOL exitContext)
+FCIMPL4(INT32, WaitHandleNative::CorSignalAndWaitOneNative, SafeHandle* safeWaitHandleSignalUNSAFE,SafeHandle* safeWaitHandleWaitUNSAFE, INT32 timeout, CLR_BOOL exitContext)
{
FCALL_CONTRACT;