projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a9a6209
)
[mono-threads] Change suspend abort timeout to infinite and fix timeout env var parsing.
author
Rodrigo Kumpera
<kumpera@gmail.com>
Wed, 20 Jul 2016 01:06:53 +0000
(18:06 -0700)
committer
Rodrigo Kumpera
<kumpera@gmail.com>
Wed, 20 Jul 2016 01:06:53 +0000
(18:06 -0700)
mono/utils/mono-threads.c
patch
|
blob
|
history
diff --git
a/mono/utils/mono-threads.c
b/mono/utils/mono-threads.c
index ea87586328369550f1e287cbfe8660ef2d1ab099..07d7b26ce0185b966074e577a5810dd4d4143fd2 100644
(file)
--- a/
mono/utils/mono-threads.c
+++ b/
mono/utils/mono-threads.c
@@
-76,11
+76,11
@@
static gboolean unified_suspend_enabled;
#define mono_thread_info_run_state(info) (((MonoThreadInfo*)info)->thread_state & THREAD_STATE_MASK)
/*warn at 50 ms*/
#define mono_thread_info_run_state(info) (((MonoThreadInfo*)info)->thread_state & THREAD_STATE_MASK)
/*warn at 50 ms*/
-#define SLEEP_DURATION_BEFORE_WARNING (
1
0)
-/*
abort at 1 sec
*/
-#define SLEEP_DURATION_BEFORE_ABORT
200
+#define SLEEP_DURATION_BEFORE_WARNING (
5
0)
+/*
never aborts
*/
+#define SLEEP_DURATION_BEFORE_ABORT
MONO_INFINITE_WAIT
-static
long
sleepWarnDuration = SLEEP_DURATION_BEFORE_WARNING,
+static
guint32
sleepWarnDuration = SLEEP_DURATION_BEFORE_WARNING,
sleepAbortDuration = SLEEP_DURATION_BEFORE_ABORT;
static int suspend_posts, resume_posts, abort_posts, waits_done, pending_ops;
sleepAbortDuration = SLEEP_DURATION_BEFORE_ABORT;
static int suspend_posts, resume_posts, abort_posts, waits_done, pending_ops;
@@
-662,6
+662,7
@@
mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
unified_suspend_enabled = g_getenv ("MONO_ENABLE_UNIFIED_SUSPEND") != NULL || mono_threads_is_coop_enabled ();
if ((sleepLimit = g_getenv ("MONO_SLEEP_ABORT_LIMIT")) != NULL) {
unified_suspend_enabled = g_getenv ("MONO_ENABLE_UNIFIED_SUSPEND") != NULL || mono_threads_is_coop_enabled ();
if ((sleepLimit = g_getenv ("MONO_SLEEP_ABORT_LIMIT")) != NULL) {
+ errno = 0;
long threshold = strtol(sleepLimit, NULL, 10);
if ((errno == 0) && (threshold >= 40)) {
sleepAbortDuration = threshold;
long threshold = strtol(sleepLimit, NULL, 10);
if ((errno == 0) && (threshold >= 40)) {
sleepAbortDuration = threshold;