2 * mono-threads-posix-abort-syscall.c: Low-level syscall aborting
5 * Ludovic Henry (ludovic@xamarin.com)
7 * (C) 2015 Xamarin, Inc
13 #if defined (__MACH__)
14 #define _DARWIN_C_SOURCE 1
17 #include "mono-threads.h"
18 #include "mono-threads-posix-signals.h"
20 #if defined(USE_POSIX_BACKEND)
23 mono_threads_abort_syscall_init (void)
25 mono_threads_posix_init_signals (MONO_THREADS_POSIX_INIT_SIGNALS_ABORT
);
29 mono_threads_suspend_abort_syscall (MonoThreadInfo
*info
)
31 /* We signal a thread to break it from the current syscall.
32 * This signal should not be interpreted as a suspend request. */
33 info
->syscall_break_signal
= TRUE
;
34 if (!mono_threads_pthread_kill (info
, mono_threads_posix_get_abort_signal ()))
35 mono_threads_add_to_pending_operation_set (info
);
39 mono_threads_suspend_needs_abort_syscall (void)