Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 2.8-p6
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (34 sloc) 0.869 kb
/*
* 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>
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);
}
Jump to Line
Something went wrong with that request. Please try again.