From: Aleksey Kliger (λgeek) Date: Mon, 6 Jun 2016 16:00:47 +0000 (-0400) Subject: Merge pull request #2734 from nealef/master X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=883a0ae745bf33b35d44bb730d5714936a2141f7 Merge pull request #2734 from nealef/master Enhance log tracing --- 883a0ae745bf33b35d44bb730d5714936a2141f7 diff --cc mono/utils/mono-threads.c index a92d250b290,3d479a07fe1..03c0aca8ddf --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@@ -655,11 -637,20 +659,20 @@@ mono_threads_init (MonoThreadInfoCallba g_assert (res); unified_suspend_enabled = g_getenv ("MONO_ENABLE_UNIFIED_SUSPEND") != NULL || mono_threads_is_coop_enabled (); + + if ((sleepLimit = g_getenv ("MONO_SLEEP_ABORT_LIMIT")) != NULL) { + long threshold = strtol(sleepLimit, NULL, 10); + if ((errno == 0) && (threshold >= 40)) { + sleepAbortDuration = threshold; + sleepWarnDuration = threshold / 20; + } else + g_warning("MONO_SLEEP_ABORT_LIMIT must be a number >= 40"); + } - mono_coop_sem_init (&global_suspend_semaphore, 1); + mono_os_sem_init (&global_suspend_semaphore, 1); mono_os_sem_init (&suspend_semaphore, 0); - mono_lls_init (&thread_list, NULL); + mono_lls_init (&thread_list, NULL, HAZARD_FREE_NO_LOCK); mono_thread_smr_init (); mono_threads_init_platform (); mono_threads_init_coop ();