Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Kumpera <kumpera@users.noreply.github.com>2016-11-14 22:05:12 +0300
committerGitHub <noreply@github.com>2016-11-14 22:05:12 +0300
commit890670ab8022f81780b2d80dd1d4047fd8e1a534 (patch)
tree971c5c30f1cc93472fc3300c45ef58edf98904c6
parentfab452a7a8fecd695273e61828c4348124bc0472 (diff)
parentca9e4a836e9f86b650d432093b2cb67e20b977cd (diff)
Merge pull request #3917 from ludovic-henry/4.8-fix-suspend-posix
[4.8][threads] Fix Posix async resume
-rw-r--r--mono/utils/mono-threads-posix.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mono/utils/mono-threads-posix.c b/mono/utils/mono-threads-posix.c
index ce2f58ad138..de38adf1373 100644
--- a/mono/utils/mono-threads-posix.c
+++ b/mono/utils/mono-threads-posix.c
@@ -456,8 +456,13 @@ This begins async resume. This function must do the following:
gboolean
mono_threads_suspend_begin_async_resume (MonoThreadInfo *info)
{
- mono_threads_add_to_pending_operation_set (info);
- return mono_threads_pthread_kill (info, mono_threads_posix_get_restart_signal ()) == 0;
+ int sig = mono_threads_posix_get_restart_signal ();
+
+ if (!mono_threads_pthread_kill (info, sig)) {
+ mono_threads_add_to_pending_operation_set (info);
+ return TRUE;
+ }
+ return FALSE;
}
void