X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Ftasklets.c;h=6766c26a694ad7f82fb5daaf20a32cef29aa049f;hb=8f09dad4353bb75afebf96ad58d08f7e7f3bf56d;hp=a49be599e512a0f04c789c940411dd692e8e2843;hpb=2602f1367e4d1d9ae2207ed13040e3594dc40121;p=mono.git diff --git a/mono/mini/tasklets.c b/mono/mini/tasklets.c index a49be599e51..6766c26a694 100644 --- a/mono/mini/tasklets.c +++ b/mono/mini/tasklets.c @@ -19,7 +19,7 @@ internal_init (void) { if (keepalive_stacks) return; - MONO_GC_REGISTER_ROOT (keepalive_stacks); + MONO_GC_REGISTER_ROOT_PINNING (keepalive_stacks); keepalive_stacks = mono_g_hash_table_new (NULL, NULL); } @@ -69,12 +69,12 @@ continuation_mark_frame (MonoContinuation *cont) ctx = new_ctx; if (endloop) break; - if (strcmp (ji->method->name, "Mark") == 0) + if (strcmp (jinfo_get_method (ji)->name, "Mark") == 0) endloop = TRUE; } while (1); cont->top_sp = MONO_CONTEXT_GET_SP (&ctx); - /*g_print ("method: %s, sp: %p\n", ji->method->name, cont->top_sp);*/ + /*g_print ("method: %s, sp: %p\n", jinfo_get_method (ji)->name, cont->top_sp);*/ return NULL; } @@ -95,7 +95,7 @@ continuation_store (MonoContinuation *cont, int state, MonoException **e) } cont->lmf = lmf; - cont->return_ip = __builtin_return_address (0); + cont->return_ip = __builtin_extract_return_addr (__builtin_return_address (0)); cont->return_sp = __builtin_frame_address (0); num_bytes = (char*)cont->top_sp - (char*)cont->return_sp; @@ -104,8 +104,10 @@ continuation_store (MonoContinuation *cont, int state, MonoException **e) if (cont->saved_stack && num_bytes <= cont->stack_alloc_size) { /* clear to avoid GC retention */ - if (num_bytes < cont->stack_used_size) + if (num_bytes < cont->stack_used_size) { memset ((char*)cont->saved_stack + num_bytes, 0, cont->stack_used_size - num_bytes); + } + cont->stack_used_size = num_bytes; } else { tasklets_lock (); internal_init ();