Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: mono-2.11.0
Fetching contributors…

Cannot retrieve contributors at this time

file 52 lines (42 sloc) 1.052 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
/*
* runtime.c: Runtime functions
*
* Authors:
* Jonathan Pryor
*
* Copyright 2010 Novell, Inc (http://www.novell.com)
*/

#include <config.h>

#include <glib.h>

#include <mono/metadata/appdomain.h>
#include <mono/metadata/class.h>
#include <mono/metadata/class-internals.h>
#include <mono/metadata/runtime.h>
#include <mono/metadata/monitor.h>

static void
fire_process_exit_event (MonoDomain *domain, gpointer user_data)
{
MonoClassField *field;
gpointer pa [2];
MonoObject *delegate, *exc;

field = mono_class_get_field_from_name (mono_defaults.appdomain_class, "ProcessExit");
g_assert (field);

delegate = *(MonoObject **)(((char *)domain->domain) + field->offset);
if (delegate == NULL)
return;

pa [0] = domain;
pa [1] = NULL;
mono_runtime_delegate_invoke (delegate, pa, &exc);
}

void
mono_runtime_shutdown (void)
{
mono_domain_foreach (fire_process_exit_event, NULL);
}


gboolean
mono_runtime_is_critical_method (MonoMethod *method)
{
if (mono_monitor_is_il_fastpath_wrapper (method))
return TRUE;
return FALSE;
}
Something went wrong with that request. Please try again.