Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. diff --git a/mono/utils/mono-threads-coop.c b/mono/utils/mono-threads-coop.c
  2. index 28bf12c..dacaa1d 100644
  3. --- a/mono/utils/mono-threads-coop.c
  4. +++ b/mono/utils/mono-threads-coop.c
  5. @@ -314,12 +314,15 @@ mono_threads_enter_gc_safe_region_unbalanced (gpointer *stackpointer)
  6. return mono_threads_enter_gc_safe_region_unbalanced_internal (&stackdata);
  7. }
  8.  
  9. -static MONO_NO_OPTIMIZATION gpointer
  10. +static gpointer
  11. mono_threads_enter_gc_safe_region_unbalanced_with_info (MonoThreadInfo *info, MonoStackData *stackdata)
  12. {
  13. if (!mono_threads_is_blocking_transition_enabled ())
  14. return NULL;
  15.  
  16. + MonoContext ctx;
  17. + MONO_CONTEXT_GET_CURRENT (ctx);
  18. +
  19. ++coop_do_blocking_count;
  20.  
  21. const char *function_name = mono_stackdata_get_function_name (stackdata);
  22. @@ -331,6 +334,7 @@ mono_threads_enter_gc_safe_region_unbalanced_with_info (MonoThreadInfo *info, Mo
  23. retry:
  24. ++coop_save_count;
  25. mono_threads_get_runtime_callbacks ()->thread_state_init (&info->thread_saved_state [SELF_SUSPEND_STATE_INDEX]);
  26. + info->thread_saved_state [SELF_SUSPEND_STATE_INDEX].ctx = ctx;
  27.  
  28. switch (mono_threads_transition_do_blocking (info, function_name)) {
  29. case DoBlockingContinue:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement