projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e023d26
)
Use SwitchToThread instead of sched_yield on Windows.
author
joncham
<joncham@gmail.com>
Fri, 22 Apr 2011 01:01:05 +0000
(21:01 -0400)
committer
joncham
<joncham@gmail.com>
Fri, 22 Apr 2011 01:28:20 +0000
(21:28 -0400)
mono/utils/mono-threads.c
patch
|
blob
|
history
diff --git
a/mono/utils/mono-threads.c
b/mono/utils/mono-threads.c
index 19656c933163517b25be0b1d01dcf61f2e819eca..d2632f3d6ee218ccecbafd389185cd7f2cc1a8d7 100644
(file)
--- a/
mono/utils/mono-threads.c
+++ b/
mono/utils/mono-threads.c
@@
-378,10
+378,16
@@
mono_thread_info_safe_suspend_sync (MonoNativeThreadId id, gboolean interrupt_ke
}
THREADS_DEBUG ("restarted thread %p\n", (gpointer)id);
- if (!sleep_duration)
+ if (!sleep_duration) {
+#ifdef HOST_WIN32
+ SwitchToThread ();
+#else
sched_yield ();
- else
+#endif
+ }
+ else {
g_usleep (sleep_duration);
+ }
sleep_duration += 10;
}