void ves_icall_System_Text_Normalization_load_normalization_resource (guint8 **argProps, guint8 **argMappedChars, guint8 **argCharMapIndex, guint8 **argHelperIndex, guint8 **argMapIdxToComposite, guint8 **argCombiningClass) { #ifdef DISABLE_NORMALIZATION mono_set_pending_exception (mono_get_exception_not_supported ("This runtime has been compiled without string normalization support.")); return; #else *argProps = (guint8*)props; *argMappedChars = (guint8*) mappedChars; *argCharMapIndex = (guint8*) charMapIndex; *argHelperIndex = (guint8*) helperIndex; *argMapIdxToComposite = (guint8*) mapIdxToComposite; *argCombiningClass = (guint8*)combiningClass; #endif }
MonoArray * ves_icall_System_Diagnostics_Process_GetProcesses_internal (void) { MonoError error; MonoArray *procs; gboolean ret; DWORD needed; int count; DWORD *pids; count = 512; do { pids = g_new0 (DWORD, count); ret = mono_process_win_enum_processes (pids, count * sizeof (guint32), &needed); if (ret == FALSE) { MonoException *exc; g_free (pids); pids = NULL; exc = mono_get_exception_not_supported ("This system does not support EnumProcesses"); mono_set_pending_exception (exc); return NULL; } if (needed < (count * sizeof (guint32))) break; g_free (pids); pids = NULL; count = (count * 3) / 2; } while (TRUE); count = needed / sizeof (guint32); procs = mono_array_new_checked (mono_domain_get (), mono_get_int32_class (), count, &error); if (mono_error_set_pending_exception (&error)) { g_free (pids); return NULL; } memcpy (mono_array_addr (procs, guint32, 0), pids, needed); g_free (pids); pids = NULL; return procs; }
static MonoException* continuation_mark_frame (MonoContinuation *cont) { MonoJitTlsData *jit_tls; MonoLMF *lmf; MonoContext ctx, new_ctx; MonoJitInfo *ji, rji; int endloop = FALSE; if (cont->domain) return mono_get_exception_argument ("cont", "Already marked"); jit_tls = (MonoJitTlsData *)mono_native_tls_get_value (mono_jit_tls_id); lmf = mono_get_lmf(); cont->domain = mono_domain_get (); cont->thread_id = mono_native_thread_id_get (); /* get to the frame that called Mark () */ memset (&rji, 0, sizeof (rji)); memset (&ctx, 0, sizeof (ctx)); do { ji = mono_find_jit_info (cont->domain, jit_tls, &rji, NULL, &ctx, &new_ctx, NULL, &lmf, NULL, NULL); if (!ji || ji == (gpointer)-1) { return mono_get_exception_not_supported ("Invalid stack frame"); } ctx = new_ctx; if (endloop) break; if (!ji->is_trampoline && 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", jinfo_get_method (ji)->name, cont->top_sp);*/ return NULL; }