diff options
author | Ludovic Henry <ludovic@xamarin.com> | 2016-10-26 21:57:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-26 21:57:17 +0300 |
commit | a0d20ebbf712fe2b196352c1210a7b44676543e7 (patch) | |
tree | 2cd5aa6fc6e436dfe2658e910c270e3f4c82a3d4 /msvc | |
parent | 0976d12d6730ce6228c9a6533fd9119ba0c46560 (diff) |
[suspend] Remove sgen specific suspend code (#3640)
* [suspend] Remove sgen specific suspend code
* [sgen] Remove unused SgenClientThreadInfo->stopped_domain field
* [sgen] Remove unused SgenClientThreadInfo->stopped_ip field
* [threads] Unsplit code for syscall abort
* [threads] Reuse posix suspend signal handler function for abort
* [mono-threads] Move debug printf to separate file
This is to avoid recompiling half of the runtime for every change to these printf.
* [stw] Slightly improve logging
* [mono-threads] Fix unified thread suspend
`mono_threads_suspend_begin_async_suspend` return FALSE iff it coudn't successfully suspend the thread, not if the thread is not in the correct state. The latter is checked by calling `mono_threads_suspend_check_suspend_result` which will return FALSE if we couldn't initialize the state of the suspended thread.
* [mono-threads] Fix unified thread suspend
If we try to suspend a thread that is still attaching, we might suspend it after it allocated the MonoInternalThread and MonoThread, but before it set the current domain or lmf. This would lead us to not scan the thread stack, which would lead to collect the newly allocate MonoInternalThread/MonoThread, leading to a crash. By letting sgen deal with the thread, even if the domain or the lmf is not set, we avoid this bug.
This makes unified suspend have the same behaviour as the previous sgen specific suspend.
* [mono-threads] Fix compilation
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/libmonoruntime.vcxproj | 14 | ||||
-rw-r--r-- | msvc/libmonoruntime.vcxproj.filters | 12 | ||||
-rw-r--r-- | msvc/libmonoutils.vcxproj | 14 |
3 files changed, 0 insertions, 40 deletions
diff --git a/msvc/libmonoruntime.vcxproj b/msvc/libmonoruntime.vcxproj index 06836b9b0f8..c51ed6b6c19 100644 --- a/msvc/libmonoruntime.vcxproj +++ b/msvc/libmonoruntime.vcxproj @@ -89,25 +89,11 @@ <ClCompile Include="..\mono\metadata\mono-security.c" />
<ClCompile Include="..\mono\metadata\seq-points-data.c" />
<ClCompile Include="..\mono\metadata\sgen-mono.c" />
- <ClCompile Include="..\mono\metadata\sgen-os-coop.c" />
<ClCompile Include="..\mono\metadata\threadpool-ms-io.c" />
<ClCompile Include="..\mono\metadata\threadpool-ms.c" />
<ClCompile Include="..\mono\metadata\sgen-bridge.c" />
<ClCompile Include="..\mono\metadata\sgen-new-bridge.c" />
<ClCompile Include="..\mono\metadata\sgen-old-bridge.c" />
- <ClCompile Include="..\mono\metadata\sgen-os-mach.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\mono\metadata\sgen-os-posix.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\mono\metadata\sgen-os-win32.c" />
<ClCompile Include="..\mono\metadata\sgen-tarjan-bridge.c" />
<ClCompile Include="..\mono\metadata\sgen-toggleref.c" />
<ClCompile Include="..\mono\metadata\sgen-stw.c" />
diff --git a/msvc/libmonoruntime.vcxproj.filters b/msvc/libmonoruntime.vcxproj.filters index 10ea5f5b356..e0257f56ee4 100644 --- a/msvc/libmonoruntime.vcxproj.filters +++ b/msvc/libmonoruntime.vcxproj.filters @@ -175,15 +175,6 @@ <ClCompile Include="..\mono\metadata\boehm-gc.c">
<Filter>Source Files\boehm</Filter>
</ClCompile>
- <ClCompile Include="..\mono\metadata\sgen-os-mach.c">
- <Filter>Source Files\sgen</Filter>
- </ClCompile>
- <ClCompile Include="..\mono\metadata\sgen-os-posix.c">
- <Filter>Source Files\sgen</Filter>
- </ClCompile>
- <ClCompile Include="..\mono\metadata\sgen-os-win32.c">
- <Filter>Source Files\sgen</Filter>
- </ClCompile>
<ClCompile Include="..\mono\metadata\appdomain.c">
<Filter>Source Files\gc</Filter>
</ClCompile>
@@ -250,9 +241,6 @@ <ClCompile Include="..\mono\metadata\sre-save.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\mono\metadata\sgen-os-coop.c">
- <Filter>Source Files\sgen</Filter>
- </ClCompile>
<ClCompile Include="..\mono\metadata\socket-io-windows.c">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/msvc/libmonoutils.vcxproj b/msvc/libmonoutils.vcxproj index f43c59b7894..ae6dadbcc61 100644 --- a/msvc/libmonoutils.vcxproj +++ b/msvc/libmonoutils.vcxproj @@ -104,19 +104,6 @@ <ClCompile Include="..\mono\utils\mono-threads-windows.c" />
<ClCompile Include="..\mono\utils\mono-threads.c" />
<ClCompile Include="..\mono\utils\mono-threads-coop.c" />
- <ClCompile Include="..\mono\utils\mono-threads-posix-abort-syscall.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\mono\utils\mono-threads-mach-abort-syscall.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\mono\utils\mono-threads-windows-abort-syscall.c" />
<ClCompile Include="..\mono\utils\mono-time.c" />
<ClCompile Include="..\mono\utils\mono-tls.c" />
<ClCompile Include="..\mono\utils\mono-uri.c" />
@@ -191,7 +178,6 @@ <ClInclude Include="..\mono\utils\mono-threads.h" />
<ClInclude Include="..\mono\utils\mono-threads-api.h" />
<ClInclude Include="..\mono\utils\mono-threads-coop.h" />
- <ClInclude Include="..\mono\utils\mono-threads-posix-signals.h" />
<ClInclude Include="..\mono\utils\mono-time.h" />
<ClInclude Include="..\mono\utils\mono-tls.h" />
<ClInclude Include="..\mono\utils\mono-uri.h" />
|