(fix of commit
e8cdc7c)
* darwin_stop_world.c [!GC_NO_THREADS_DISCOVERY]
(GC_suspend_thread_list): Retry thread_suspend if failed with
KERN_ABORTED.
# ifdef DEBUG_THREADS
GC_log_printf("Suspending 0x%lx\n", (unsigned long)thread);
# endif
- kern_result = thread_suspend(thread);
+ do {
+ kern_result = thread_suspend(thread);
+ } while (kern_result == KERN_ABORTED);
if (kern_result != KERN_SUCCESS) {
/* The thread may have quit since the thread_threads() call we */
/* mark already suspended so it's not dealt with anymore later. */