From 607278bf6b9f575b1398f30b4cb993a686a62627 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 3 Oct 2016 19:19:25 +0200 Subject: [PATCH] [tests] Fix thread-native-exit test on windows --- mono/tests/thread-native-exit.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/mono/tests/thread-native-exit.cs b/mono/tests/thread-native-exit.cs index 16af9f66a7a..e112be0fa16 100644 --- a/mono/tests/thread-native-exit.cs +++ b/mono/tests/thread-native-exit.cs @@ -15,15 +15,10 @@ class Driver { return new Thread (() => { /* Exit bypassing completely the runtime */ - try { - pthread_exit (IntPtr.Zero); - } catch (EntryPointNotFoundException) { - } - - try { - ExitThread (IntPtr.Zero); - } catch (EntryPointNotFoundException) { - } + if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX) + pthread_exit (IntPtr.Zero); + else + ExitThread (IntPtr.Zero); }); } -- 2.25.1