Imported Upstream version 4.0.1
Former-commit-id: 757121caeaad523350be5330f0a3ecc891c70fb8
This commit is contained in:
parent
7fce50ac98
commit
c54b0bda4e
@ -52,7 +52,7 @@ dist-hook:
|
|||||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||||
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
||||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/v4\.0*'`
|
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
|
||||||
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
||||||
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
||||||
# Disable this for now because it is very slow and causes wrench to timeout:
|
# Disable this for now because it is very slow and causes wrench to timeout:
|
||||||
|
@ -947,7 +947,7 @@ dist-hook:
|
|||||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||||
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
||||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/v4\.0*'`
|
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
|
||||||
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
||||||
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
||||||
.PHONY: get-monolite-latest
|
.PHONY: get-monolite-latest
|
||||||
|
3
aclocal.m4
vendored
3
aclocal.m4
vendored
@ -593,7 +593,8 @@ to "yes", and re-run configure.
|
|||||||
END
|
END
|
||||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
||||||
fi
|
fi
|
||||||
fi])
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||||
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
||||||
|
174
config.guess
vendored
174
config.guess
vendored
@ -1,8 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2013 Free Software Foundation, Inc.
|
# Copyright 1992-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2013-06-10'
|
timestamp='2014-03-23'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@ -50,7 +50,7 @@ version="\
|
|||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright 1992-2013 Free Software Foundation, Inc.
|
Copyright 1992-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
|
|||||||
LIBC=gnu
|
LIBC=gnu
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -826,7 +826,7 @@ EOF
|
|||||||
*:MINGW*:*)
|
*:MINGW*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-mingw32
|
echo ${UNAME_MACHINE}-pc-mingw32
|
||||||
exit ;;
|
exit ;;
|
||||||
i*:MSYS*:*)
|
*:MSYS*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-msys
|
echo ${UNAME_MACHINE}-pc-msys
|
||||||
exit ;;
|
exit ;;
|
||||||
i*:windows32*:*)
|
i*:windows32*:*)
|
||||||
@ -969,10 +969,10 @@ EOF
|
|||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||||
;;
|
;;
|
||||||
or1k:Linux:*:*)
|
openrisc*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
echo or1k-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
or32:Linux:*:*)
|
or32:Linux:*:* | or1k*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
padre:Linux:*:*)
|
padre:Linux:*:*)
|
||||||
@ -1260,6 +1260,7 @@ EOF
|
|||||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||||
UNAME_PROCESSOR=powerpc
|
UNAME_PROCESSOR=powerpc
|
||||||
fi
|
fi
|
||||||
|
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
||||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
@ -1271,6 +1272,15 @@ EOF
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||||
|
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||||
|
# that puts up a graphical alert prompting to install
|
||||||
|
# developer tools. Any system running Mac OS X 10.7 or
|
||||||
|
# later (Darwin 11 and later) is required to have a 64-bit
|
||||||
|
# processor. This is not true of the ARM version of Darwin
|
||||||
|
# that Apple uses in portable devices.
|
||||||
|
UNAME_PROCESSOR=x86_64
|
||||||
|
fi
|
||||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||||
@ -1361,154 +1371,6 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
eval $set_cc_for_build
|
|
||||||
cat >$dummy.c <<EOF
|
|
||||||
#ifdef _SEQUENT_
|
|
||||||
# include <sys/types.h>
|
|
||||||
# include <sys/utsname.h>
|
|
||||||
#endif
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
#if defined (sony)
|
|
||||||
#if defined (MIPSEB)
|
|
||||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
|
||||||
I don't know.... */
|
|
||||||
printf ("mips-sony-bsd\n"); exit (0);
|
|
||||||
#else
|
|
||||||
#include <sys/param.h>
|
|
||||||
printf ("m68k-sony-newsos%s\n",
|
|
||||||
#ifdef NEWSOS4
|
|
||||||
"4"
|
|
||||||
#else
|
|
||||||
""
|
|
||||||
#endif
|
|
||||||
); exit (0);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
|
||||||
printf ("arm-acorn-riscix\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (hp300) && !defined (hpux)
|
|
||||||
printf ("m68k-hp-bsd\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (NeXT)
|
|
||||||
#if !defined (__ARCHITECTURE__)
|
|
||||||
#define __ARCHITECTURE__ "m68k"
|
|
||||||
#endif
|
|
||||||
int version;
|
|
||||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
|
||||||
if (version < 4)
|
|
||||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
|
||||||
else
|
|
||||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
|
||||||
exit (0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (MULTIMAX) || defined (n16)
|
|
||||||
#if defined (UMAXV)
|
|
||||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
|
||||||
#else
|
|
||||||
#if defined (CMU)
|
|
||||||
printf ("ns32k-encore-mach\n"); exit (0);
|
|
||||||
#else
|
|
||||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (__386BSD__)
|
|
||||||
printf ("i386-pc-bsd\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (sequent)
|
|
||||||
#if defined (i386)
|
|
||||||
printf ("i386-sequent-dynix\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
#if defined (ns32000)
|
|
||||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (_SEQUENT_)
|
|
||||||
struct utsname un;
|
|
||||||
|
|
||||||
uname(&un);
|
|
||||||
|
|
||||||
if (strncmp(un.version, "V2", 2) == 0) {
|
|
||||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
|
||||||
}
|
|
||||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
|
||||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
|
||||||
}
|
|
||||||
printf ("i386-sequent-ptx\n"); exit (0);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (vax)
|
|
||||||
# if !defined (ultrix)
|
|
||||||
# include <sys/param.h>
|
|
||||||
# if defined (BSD)
|
|
||||||
# if BSD == 43
|
|
||||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
|
||||||
# else
|
|
||||||
# if BSD == 199006
|
|
||||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
|
||||||
# else
|
|
||||||
printf ("vax-dec-bsd\n"); exit (0);
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
printf ("vax-dec-bsd\n"); exit (0);
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
printf ("vax-dec-ultrix\n"); exit (0);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (alliant) && defined (i860)
|
|
||||||
printf ("i860-alliant-bsd\n"); exit (0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
exit (1);
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
|
||||||
{ echo "$SYSTEM_NAME"; exit; }
|
|
||||||
|
|
||||||
# Apollos put the system type in the environment.
|
|
||||||
|
|
||||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
|
|
||||||
|
|
||||||
# Convex versions that predate uname can use getsysinfo(1)
|
|
||||||
|
|
||||||
if [ -x /usr/convex/getsysinfo ]
|
|
||||||
then
|
|
||||||
case `getsysinfo -f cpu_type` in
|
|
||||||
c1*)
|
|
||||||
echo c1-convex-bsd
|
|
||||||
exit ;;
|
|
||||||
c2*)
|
|
||||||
if getsysinfo -f scalar_acc
|
|
||||||
then echo c32-convex-bsd
|
|
||||||
else echo c2-convex-bsd
|
|
||||||
fi
|
|
||||||
exit ;;
|
|
||||||
c34*)
|
|
||||||
echo c34-convex-bsd
|
|
||||||
exit ;;
|
|
||||||
c38*)
|
|
||||||
echo c38-convex-bsd
|
|
||||||
exit ;;
|
|
||||||
c4*)
|
|
||||||
echo c4-convex-bsd
|
|
||||||
exit ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >&2 <<EOF
|
cat >&2 <<EOF
|
||||||
$0: unable to guess system type
|
$0: unable to guess system type
|
||||||
|
|
||||||
|
30
config.sub
vendored
30
config.sub
vendored
@ -1,8 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2013 Free Software Foundation, Inc.
|
# Copyright 1992-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2013-08-10'
|
timestamp='2014-09-11'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2013 Free Software Foundation, Inc.
|
Copyright 1992-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@ -265,6 +265,7 @@ case $basic_machine in
|
|||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i860 | i960 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
|
| k1om \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
| lm32 \
|
| lm32 \
|
||||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||||
@ -282,8 +283,10 @@ case $basic_machine in
|
|||||||
| mips64vr5900 | mips64vr5900el \
|
| mips64vr5900 | mips64vr5900el \
|
||||||
| mipsisa32 | mipsisa32el \
|
| mipsisa32 | mipsisa32el \
|
||||||
| mipsisa32r2 | mipsisa32r2el \
|
| mipsisa32r2 | mipsisa32r2el \
|
||||||
|
| mipsisa32r6 | mipsisa32r6el \
|
||||||
| mipsisa64 | mipsisa64el \
|
| mipsisa64 | mipsisa64el \
|
||||||
| mipsisa64r2 | mipsisa64r2el \
|
| mipsisa64r2 | mipsisa64r2el \
|
||||||
|
| mipsisa64r6 | mipsisa64r6el \
|
||||||
| mipsisa64sb1 | mipsisa64sb1el \
|
| mipsisa64sb1 | mipsisa64sb1el \
|
||||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||||
| mipsr5900 | mipsr5900el \
|
| mipsr5900 | mipsr5900el \
|
||||||
@ -295,11 +298,11 @@ case $basic_machine in
|
|||||||
| nds32 | nds32le | nds32be \
|
| nds32 | nds32le | nds32be \
|
||||||
| nios | nios2 | nios2eb | nios2el \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| open8 \
|
| open8 | or1k | or1knd | or32 \
|
||||||
| or1k | or32 \
|
|
||||||
| pdp10 | pdp11 | pj | pjl \
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||||
| pyramid \
|
| pyramid \
|
||||||
|
| riscv32 | riscv64 \
|
||||||
| rl78 | rx \
|
| rl78 | rx \
|
||||||
| score \
|
| score \
|
||||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||||
@ -324,7 +327,7 @@ case $basic_machine in
|
|||||||
c6x)
|
c6x)
|
||||||
basic_machine=tic6x-unknown
|
basic_machine=tic6x-unknown
|
||||||
;;
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
@ -381,6 +384,7 @@ case $basic_machine in
|
|||||||
| hexagon-* \
|
| hexagon-* \
|
||||||
| i*86-* | i860-* | i960-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
|
| k1om-* \
|
||||||
| le32-* | le64-* \
|
| le32-* | le64-* \
|
||||||
| lm32-* \
|
| lm32-* \
|
||||||
| m32c-* | m32r-* | m32rle-* \
|
| m32c-* | m32r-* | m32rle-* \
|
||||||
@ -400,8 +404,10 @@ case $basic_machine in
|
|||||||
| mips64vr5900-* | mips64vr5900el-* \
|
| mips64vr5900-* | mips64vr5900el-* \
|
||||||
| mipsisa32-* | mipsisa32el-* \
|
| mipsisa32-* | mipsisa32el-* \
|
||||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||||
|
| mipsisa32r6-* | mipsisa32r6el-* \
|
||||||
| mipsisa64-* | mipsisa64el-* \
|
| mipsisa64-* | mipsisa64el-* \
|
||||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||||
|
| mipsisa64r6-* | mipsisa64r6el-* \
|
||||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||||
| mipsr5900-* | mipsr5900el-* \
|
| mipsr5900-* | mipsr5900el-* \
|
||||||
@ -413,6 +419,7 @@ case $basic_machine in
|
|||||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| open8-* \
|
| open8-* \
|
||||||
|
| or1k*-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||||
@ -822,6 +829,10 @@ case $basic_machine in
|
|||||||
basic_machine=powerpc-unknown
|
basic_machine=powerpc-unknown
|
||||||
os=-morphos
|
os=-morphos
|
||||||
;;
|
;;
|
||||||
|
moxiebox)
|
||||||
|
basic_machine=moxie-unknown
|
||||||
|
os=-moxiebox
|
||||||
|
;;
|
||||||
msdos)
|
msdos)
|
||||||
basic_machine=i386-pc
|
basic_machine=i386-pc
|
||||||
os=-msdos
|
os=-msdos
|
||||||
@ -1367,14 +1378,14 @@ case $os in
|
|||||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-qnx*)
|
-qnx*)
|
||||||
@ -1592,9 +1603,6 @@ case $basic_machine in
|
|||||||
mips*-*)
|
mips*-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
or1k-*)
|
|
||||||
os=-elf
|
|
||||||
;;
|
|
||||||
or32-*)
|
or32-*)
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
@ -1 +1 @@
|
|||||||
25aca4d9234ba9866baffb6d0b49f85530244ece
|
bb398f7ae55a546fb7bf939dabfed4a3fb9730bc
|
@ -1 +1 @@
|
|||||||
64b436391b7e39451d01b5d01756e5484d447684
|
01ba76eb592f8ee610b360b3614f3f6a8de954d6
|
40
docs/deploy/api-style.css
Normal file
40
docs/deploy/api-style.css
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
337
docs/deploy/mono-api-assembly.html
Normal file
337
docs/deploy/mono-api-assembly.html
Normal file
@ -0,0 +1,337 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-assembly.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Assemblies</h2>
|
||||||
|
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
#include <metadata/assembly.h>
|
||||||
|
|
||||||
|
typedef struct _MonoImage MonoImage;
|
||||||
|
typedef struct _MonoAssembly MonoAssembly;
|
||||||
|
|
||||||
|
MonoAssembly* <a href="#api:mono_assembly_open">mono_assembly_open</a> (const char *filename,
|
||||||
|
MonoImageOpenStatus *status);
|
||||||
|
void <a href="#api:mono_assembly_close">mono_assembly_close</a> (MonoAssembly *assembly);
|
||||||
|
MonoAssembly* <a href="#api:mono_assembly_load">mono_assembly_load</a> (MonoAssemblyName *aname,
|
||||||
|
const char *basedir,
|
||||||
|
MonoImageOpenStatus *status);
|
||||||
|
MonoAssembly* <a href="#api:mono_assembly_load_full">mono_assembly_load_full</a> (MonoAssemblyName *aname,
|
||||||
|
const char *basedir,
|
||||||
|
MonoImageOpenStatus *status,
|
||||||
|
gboolean refonly);
|
||||||
|
MonoAssembly* <a href="#api:mono_assembly_loaded">mono_assembly_loaded</a> (MonoAssemblyName *aname);
|
||||||
|
<a href="#api:mono_assembly_get_object"></a>
|
||||||
|
MonoImage* <a href="#api:mono_assembly_get_image">mono_assembly_get_image</a> (MonoAssembly *assembly);
|
||||||
|
MonoAssembly* <a href="#api:mono_assembly_get_main">mono_assembly_get_main</a> (void);
|
||||||
|
G_CONST_RETURN gchar * <a href="#api:mono_assembly_getrootdir">mono_assembly_getrootdir</a> (void);
|
||||||
|
void <a href="#api:mono_assembly_name_free">mono_assembly_name_free</a> (MonoAssemblyName *aname);
|
||||||
|
char* <a href="#api:mono_stringify_assembly_name">mono_stringify_assembly_name</a> (MonoAssemblyName *aname);
|
||||||
|
gboolean <a href="#api:mono_assembly_names_equal">mono_assembly_names_equal</a> (MonoAssemblyName *l,
|
||||||
|
MonoAssemblyName *r);
|
||||||
|
<a href="#api:mono_module_file_get_object"></a>
|
||||||
|
<a href="#api:mono_module_get_object"></a>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a name="cil_assembly_load"></a>
|
||||||
|
<h3>Assembly Loading</h3>
|
||||||
|
|
||||||
|
<a name="api:mono_assembly_open"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_open</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoAssembly*
|
||||||
|
mono_assembly_open (const char *filename, MonoImageOpenStatus *status)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>filename:</i></dt><dd> Opens the assembly pointed out by this name</dd><dt><i>status:</i></dt><dd> where a status code can be returned</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> a pointer to the MonoAssembly if <i>filename</i> contains a valid
|
||||||
|
|
||||||
|
assembly or NULL on error. Details about the error are stored in the
|
||||||
|
<i>status</i> variable.</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
mono_assembly_open opens the PE-image pointed by <i>filename</i>, and
|
||||||
|
loads any external assemblies referenced by it.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_close"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_close</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_assembly_close (MonoAssembly *assembly)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>assembly:</i></dt><dd> the assembly to release.</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
This method releases a reference to the <i>assembly</i>. The assembly is
|
||||||
|
only released when all the outstanding references to it are released.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_load"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_load</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoAssembly*
|
||||||
|
mono_assembly_load (MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>aname:</i></dt><dd> A MonoAssemblyName with the assembly name to load.</dd><dt><i>basedir:</i></dt><dd> A directory to look up the assembly at.</dd><dt><i>status:</i></dt><dd> a pointer to a MonoImageOpenStatus to return the status of the load operation</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the assembly referenced by <i>aname</i> loaded or NULL on error. On error the
|
||||||
|
|
||||||
|
value pointed by status is updated with an error code.</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Loads the assembly referenced by <i>aname</i>, if the value of <i>basedir</i> is not NULL, it
|
||||||
|
attempts to load the assembly from that directory before probing the standard locations.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_load_full"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_load_full</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoAssembly*
|
||||||
|
mono_assembly_load_full (MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status, gboolean refonly)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>aname:</i></dt><dd> A MonoAssemblyName with the assembly name to load.</dd><dt><i>basedir:</i></dt><dd> A directory to look up the assembly at.</dd><dt><i>status:</i></dt><dd> a pointer to a MonoImageOpenStatus to return the status of the load operation</dd><dt><i>refonly:</i></dt><dd> Whether this assembly is being opened in "reflection-only" mode.</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the assembly referenced by <i>aname</i> loaded or NULL on error. On error the
|
||||||
|
|
||||||
|
value pointed by status is updated with an error code.</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Loads the assembly referenced by <i>aname</i>, if the value of <i>basedir</i> is not NULL, it
|
||||||
|
attempts to load the assembly from that directory before probing the standard locations.
|
||||||
|
|
||||||
|
If the assembly is being opened in reflection-only mode (<i>refonly</i> set to TRUE) then no
|
||||||
|
assembly binding takes place.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_loaded"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_loaded</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoAssembly*
|
||||||
|
mono_assembly_loaded (MonoAssemblyName *aname)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>aname:</i></dt><dd> an assembly to look for.</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> NULL If the given <i>aname</i> assembly has not been loaded, or a pointer to
|
||||||
|
|
||||||
|
a MonoAssembly that matches the MonoAssemblyName specified.</blockquote>
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_get_object"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_get_object</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_assembly_get_object</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Working with Assemblies</h3>
|
||||||
|
|
||||||
|
<a name="api:mono_assembly_get_image"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_get_image</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoImage*
|
||||||
|
mono_assembly_get_image (MonoAssembly *assembly)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>assembly:</i></dt><dd> The assembly to retrieve the image from</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the MonoImage associated with this assembly.
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_get_main"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_get_main</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoAssembly*
|
||||||
|
mono_assembly_get_main (void)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the assembly for the application, the first assembly that is loaded by the VM
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_getrootdir"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_getrootdir</div>
|
||||||
|
|
||||||
|
<div class="prototype">G_CONST_RETURN gchar *
|
||||||
|
mono_assembly_getrootdir (void)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> a string with the directory, this string should not be freed.
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p /> <p />
|
||||||
|
|
||||||
|
Obtains the root directory used for looking up assemblies.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Assembly Names</h3>
|
||||||
|
|
||||||
|
<p />The MonoAssemblyName contains the full identity of an
|
||||||
|
assembly (name, culture, public key, public key token,
|
||||||
|
version and any other flags).
|
||||||
|
|
||||||
|
<p />These unmanaged objects represent the <a href="http://www.mono-project.com/monodoc/T:System.Reflection.AssemblyName">System.Reflection.AssemblyName</a>
|
||||||
|
managed type.
|
||||||
|
|
||||||
|
<a name="api:mono_assembly_name_free"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_name_free</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_assembly_name_free (MonoAssemblyName *aname)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>aname:</i></dt><dd> assembly name to free</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p /> <p />
|
||||||
|
|
||||||
|
Frees the provided assembly name object.
|
||||||
|
(it does not frees the object itself, only the name members).
|
||||||
|
|
||||||
|
</div> <a name="api:mono_stringify_assembly_name"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_stringify_assembly_name</div>
|
||||||
|
|
||||||
|
<div class="prototype">char*
|
||||||
|
mono_stringify_assembly_name (MonoAssemblyName *aname)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>aname:</i></dt><dd> the assembly name.</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> a newly allocated string with a string representation of
|
||||||
|
|
||||||
|
the assembly name.</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Convert <i>aname</i> into its string format. The returned string is dynamically
|
||||||
|
allocated and should be freed by the caller.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_assembly_names_equal"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_assembly_names_equal</div>
|
||||||
|
|
||||||
|
<div class="prototype">gboolean
|
||||||
|
mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>l:</i></dt><dd> first assembly</dd><dt><i>r:</i></dt><dd> second assembly.</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> TRUE if both assembly names are equal.
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Compares two MonoAssemblyNames and returns whether they are equal.
|
||||||
|
|
||||||
|
This compares the names, the cultures, the release version and their
|
||||||
|
public tokens.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Modules</h3>
|
||||||
|
|
||||||
|
<p />An assembly is made up of one or more modules.
|
||||||
|
|
||||||
|
<a name="api:mono_module_file_get_object"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_module_file_get_object</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_module_file_get_object</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_module_get_object"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_module_get_object</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_module_get_object</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
821
docs/deploy/mono-api-class.html
Normal file
821
docs/deploy/mono-api-class.html
Normal file
File diff suppressed because it is too large
Load Diff
162
docs/deploy/mono-api-codegen.html
Normal file
162
docs/deploy/mono-api-codegen.html
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-codegen.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h3>Code manager</h3>
|
||||||
|
|
||||||
|
<a name="api:mono_code_manager_commit"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_code_manager_commit</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsize)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>cman:</i></dt><dd> a code manager</dd><dt><i>data:</i></dt><dd> the pointer returned by mono_code_manager_reserve ()</dd><dt><i>size:</i></dt><dd> the size requested in the call to mono_code_manager_reserve ()</dd><dt><i>newsize:</i></dt><dd> the new size to reserve</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
If we reserved too much room for a method and we didn't allocate
|
||||||
|
already from the code manager, we can get back the excess allocation
|
||||||
|
for later use in the code manager.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_code_manager_destroy"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_code_manager_destroy</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_code_manager_destroy (MonoCodeManager *cman)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>cman:</i></dt><dd> a code manager</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Free all the memory associated with the code manager <i>cman</i>.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_code_manager_foreach"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_code_manager_foreach</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_code_manager_foreach (MonoCodeManager *cman, MonoCodeManagerFunc func, void *user_data)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>cman:</i></dt><dd> a code manager</dd><dt><i>func:</i></dt><dd> a callback function pointer</dd><dt><i>user_data:</i></dt><dd> additional data to pass to <i>func</i></dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Invokes the callback <i>func</i> for each different chunk of memory allocated
|
||||||
|
in the code manager <i>cman</i>.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_code_manager_invalidate"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_code_manager_invalidate</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_code_manager_invalidate (MonoCodeManager *cman)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>cman:</i></dt><dd> a code manager</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Fill all the memory with an invalid native code value
|
||||||
|
so that any attempt to execute code allocated in the code
|
||||||
|
manager <i>cman</i> will fail. This is used for debugging purposes.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_code_manager_new_dynamic"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_code_manager_new_dynamic</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoCodeManager*
|
||||||
|
mono_code_manager_new_dynamic (void)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the new code manager
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Creates a new code manager suitable for holding native code that can be
|
||||||
|
used for single or small methods that need to be deallocated independently
|
||||||
|
of other native code.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_code_manager_new"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_code_manager_new</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoCodeManager*
|
||||||
|
mono_code_manager_new (void)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the new code manager
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Creates a new code manager. A code manager can be used to allocate memory
|
||||||
|
suitable for storing native code that can be later executed.
|
||||||
|
A code manager allocates memory from the operating system in large chunks
|
||||||
|
(typically 64KB in size) so that many methods can be allocated inside them
|
||||||
|
close together, improving cache locality.
|
||||||
|
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
128
docs/deploy/mono-api-counters.html
Normal file
128
docs/deploy/mono-api-counters.html
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-counters.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Counters</h2>
|
||||||
|
|
||||||
|
<p />Counters is a Mono API for flexible statistics collection
|
||||||
|
and is used to track different events inside the JIT.
|
||||||
|
|
||||||
|
<p />You would typically register an address with the
|
||||||
|
<tt>mono_counters_register</tt> routine and increment the
|
||||||
|
counters from your application as you go. At the end of the
|
||||||
|
program you would call mono_counters_dump which will display
|
||||||
|
all the registered counters.
|
||||||
|
|
||||||
|
<p />If you need more complicated counter computation, a
|
||||||
|
function can be provided instead of an address. In that case
|
||||||
|
the <tt>MONO_COUNTER_CALLBACK</tt> flag must be ored in the
|
||||||
|
type request.
|
||||||
|
|
||||||
|
<p />The types that can be rendered are:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
MONO_COUNTER_INT
|
||||||
|
MONO_COUNTER_UINT
|
||||||
|
MONO_COUNTER_WORD
|
||||||
|
MONO_COUNTER_LONG
|
||||||
|
MONO_COUNTER_ULONG
|
||||||
|
MONO_COUNTER_DOUBLE
|
||||||
|
MONO_COUNTER_STRING
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p />To organize the output, you register also a section where
|
||||||
|
the counter will be displayed, or one of the following values
|
||||||
|
when you register your counter:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
MONO_COUNTER_JIT
|
||||||
|
MONO_COUNTER_GC
|
||||||
|
MONO_COUNTER_METADATA
|
||||||
|
MONO_COUNTER_GENERICS
|
||||||
|
MONO_COUNTER_SECURITY
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<a name="api:mono_counters_dump"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_counters_dump</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_counters_dump (int section_mask, FILE *outfile)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>section_mask:</i></dt><dd> The sections to dump counters for</dd><dt><i>outfile:</i></dt><dd> a FILE to dump the results to</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Displays the counts of all the enabled counters registered.
|
||||||
|
To filter by variance, you can OR one or more variance with the specific section you want.
|
||||||
|
Use MONO_COUNTER_SECTION_MASK to dump all categories of a specific variance.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_counters_enable"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_counters_enable</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_counters_enable (int section_mask)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>section_mask:</i></dt><dd> a mask listing the sections that will be displayed</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
This is used to track which counters will be displayed.
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
180
docs/deploy/mono-api-debug.html
Normal file
180
docs/deploy/mono-api-debug.html
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-debug.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a name="api:mono_debug_il_offset_from_address"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debug_il_offset_from_address</div>
|
||||||
|
|
||||||
|
<div class="prototype">gint32
|
||||||
|
mono_debug_il_offset_from_address (MonoMethod *method, MonoDomain *domain, guint32 native_offset)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Compute the IL offset corresponding to NATIVE_OFFSET inside the native
|
||||||
|
code of METHOD in DOMAIN.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debug_add_method"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debug_add_method</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debug_add_method</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debug_close_mono_symbol_file"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debug_close_mono_symbol_file</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debug_close_mono_symbol_file</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debug_find_method"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debug_find_method</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debug_find_method</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debug_using_mono_debugger"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debug_using_mono_debugger</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debug_using_mono_debugger</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Mono Debugger Interface</h3>
|
||||||
|
|
||||||
|
<p />These are methods that are invoked by the debugger at
|
||||||
|
runtime.
|
||||||
|
|
||||||
|
<a name="api:mono_debugger_breakpoint_callback"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_breakpoint_callback</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_breakpoint_callback</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_check_runtime_version"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_check_runtime_version</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_check_runtime_version</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_event"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_event</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_event</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_handle_exception"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_handle_exception</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_handle_exception</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_insert_breakpoint_full"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_insert_breakpoint_full</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_insert_breakpoint_full</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_insert_breakpoint"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_insert_breakpoint</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_insert_breakpoint</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_lock"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_lock</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_lock</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_method_has_breakpoint"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_method_has_breakpoint</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_method_has_breakpoint</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_remove_breakpoint"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_remove_breakpoint</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_remove_breakpoint</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_runtime_invoke"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_runtime_invoke</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_runtime_invoke</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_debugger_unlock"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_debugger_unlock</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_debugger_unlock</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
151
docs/deploy/mono-api-decimal.html
Normal file
151
docs/deploy/mono-api-decimal.html
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-decimal.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Decimal Support</h1>
|
||||||
|
|
||||||
|
<p />You can use the mono_decimal functions to access and
|
||||||
|
manipulate <tt>System.Decimal</tt> types from C.
|
||||||
|
|
||||||
|
<a name="api:mono_decimal2double"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimal2double</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimal2double</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimal2Int64"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimal2Int64</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimal2Int64</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimal2string"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimal2string</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimal2string</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimal2UInt64"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimal2UInt64</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimal2UInt64</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalCompare"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalCompare</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalCompare</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalDiv"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalDiv</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalDiv</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalFloorAndTrunc"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalFloorAndTrunc</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalFloorAndTrunc</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalIncr"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalIncr</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalIncr</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalIntDiv"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalIntDiv</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalIntDiv</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalMult"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalMult</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalMult</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalRound"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalRound</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalRound</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_decimalSetExponent"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_decimalSetExponent</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_decimalSetExponent</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_double2decimal"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_double2decimal</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_double2decimal</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
307
docs/deploy/mono-api-domains.html
Normal file
307
docs/deploy/mono-api-domains.html
Normal file
@ -0,0 +1,307 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-domains.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Application Domains</h2>
|
||||||
|
|
||||||
|
<h3>Synopsis</h3>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
#include <metadata/appdomain.h>
|
||||||
|
|
||||||
|
/* Managed AppDomain */
|
||||||
|
typedef struct _MonoAppDomain MonoAppDomain;
|
||||||
|
|
||||||
|
/* Unmanaged representation */
|
||||||
|
typedef struct _MonoDomain MonoDomain;
|
||||||
|
|
||||||
|
/* Represents System.Runtime.Remoting.Contexts.Context */
|
||||||
|
typedef struct _MonoAppContext MonoAppContext
|
||||||
|
MonoAssembly* <a href="#api:mono_domain_assembly_open">mono_domain_assembly_open</a> (MonoDomain *domain,
|
||||||
|
const char *name);
|
||||||
|
<a href="#api:mono_domain_create"></a>
|
||||||
|
gboolean <a href="#api:mono_domain_finalize">mono_domain_finalize</a> (MonoDomain *domain,
|
||||||
|
guint32 timeout) ;
|
||||||
|
<a href="#api:mono_domain_foreach"></a>
|
||||||
|
<a href="#api:mono_domain_free"></a>
|
||||||
|
<a href="#api:mono_domain_get_by_id"></a>
|
||||||
|
MonoDomain* <a href="#api:mono_domain_get_id">mono_domain_get_by_id</a> (gint32 domainid) ;
|
||||||
|
MonoDomain* <a href="#api:mono_domain_get">mono_domain_get</a> ();
|
||||||
|
gboolean <a href="#api:mono_domain_has_type_resolve">mono_domain_has_type_resolve</a> (MonoDomain *domain);
|
||||||
|
<a href="#api:mono_domain_is_unloading"></a>
|
||||||
|
void <a href="#api:mono_domain_set_internal">mono_domain_set_internal</a> (MonoDomain *domain);
|
||||||
|
gboolean <a href="#api:mono_domain_set">mono_domain_set</a> (MonoDomain *domain,
|
||||||
|
gboolean force);
|
||||||
|
MonoReflectionAssembly* <a href="#api:mono_domain_try_type_resolve">mono_domain_try_type_resolve</a> (MonoDomain *domain,
|
||||||
|
char *name,
|
||||||
|
MonoObject *tb);
|
||||||
|
gboolean <a href="#api:mono_domain_owns_vtable_slot">mono_domain_owns_vtable_slot</a> (MonoDomain *domain,
|
||||||
|
gpointer vtable_slot);
|
||||||
|
<a href="#api:mono_context_get"></a>
|
||||||
|
<a href="#api:mono_context_set"></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />Application domains are used to isolate multiple
|
||||||
|
applications on a single Mono virtual machine. They are
|
||||||
|
conceptually similiar to processes, the difference is that
|
||||||
|
processes are managed by the operating system, while
|
||||||
|
application domains are managed by the Mono virtual machine.
|
||||||
|
|
||||||
|
<p />For more information on applications domains see the <a href="http://www.gotdotnet.com/team/clr/AppdomainFAQ.aspx">AppDomain FAQ</a>.
|
||||||
|
|
||||||
|
<p />The <tt>MonoDomain</tt> is the unmanaged representation of
|
||||||
|
the <a href="http://www.mono-project.com/monodoc/T:System.AppDomain">System.AppDomain</a>
|
||||||
|
managed type, while the <tt>MonoAppDomain</tt> type represents
|
||||||
|
the managed version (<tt>MonoAppDomain</tt> has a pointer to
|
||||||
|
a <tt>MonoDomain</tt>).
|
||||||
|
|
||||||
|
<a name="api:mono_domain_assembly_open"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_assembly_open</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoAssembly*
|
||||||
|
mono_domain_assembly_open (MonoDomain *domain, const char *name)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> the application domain</dd><dt><i>name:</i></dt><dd> file name of the assembly</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
fixme: maybe we should integrate this with mono_assembly_open ??
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_create"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_create</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_domain_create</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_finalize"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_finalize</div>
|
||||||
|
|
||||||
|
<div class="prototype">
|
||||||
|
gboolean
|
||||||
|
mono_domain_finalize (MonoDomain *domain, guint32 timeout)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> the domain to finalize</dd><dt><i>timeout:</i></dt><dd> msects to wait for the finalization to complete, -1 to wait indefinitely</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> TRUE if succeeded, FALSE if there was a timeout
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Request finalization of all finalizable objects inside <i>domain</i>. Wait
|
||||||
|
<i>timeout</i> msecs for the finalization to complete.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_foreach"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_foreach</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_domain_foreach</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_free"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_free</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_domain_free</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_get_by_id"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_get_by_id</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_domain_get_by_id</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_get_id"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_get_id</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoDomain*
|
||||||
|
mono_domain_get_by_id (gint32 domainid)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domainid:</i></dt><dd> the ID</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the a domain for a specific domain id.
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_get"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_get</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoDomain*
|
||||||
|
mono_domain_get ()
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the current domain, to obtain the root domain use
|
||||||
|
|
||||||
|
mono_get_root_domain().</blockquote>
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_has_type_resolve"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_has_type_resolve</div>
|
||||||
|
|
||||||
|
<div class="prototype">gboolean
|
||||||
|
mono_domain_has_type_resolve (MonoDomain *domain)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> application domains being looked up</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Returns true if the AppDomain.TypeResolve field has been
|
||||||
|
set.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_is_unloading"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_is_unloading</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_domain_is_unloading</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_set_internal"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_set_internal</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_domain_set_internal (MonoDomain *domain)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> the new domain</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Sets the current domain to <i>domain</i>.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_set"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_set</div>
|
||||||
|
|
||||||
|
<div class="prototype">gboolean
|
||||||
|
mono_domain_set (MonoDomain *domain, gboolean force)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> domain</dd><dt><i>force:</i></dt><dd> force setting.</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote>
|
||||||
|
|
||||||
|
TRUE on success;
|
||||||
|
FALSE if the domain is unloaded</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Set the current appdomain to <i>domain</i>. If <i>force</i> is set, set it even
|
||||||
|
if it is being unloaded.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_try_type_resolve"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_try_type_resolve</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoReflectionAssembly*
|
||||||
|
mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *tb)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> application domainwhere the name where the type is going to be resolved</dd><dt><i>name:</i></dt><dd> the name of the type to resolve or NULL.</dd><dt><i>tb:</i></dt><dd> A System.Reflection.Emit.TypeBuilder, used if name is NULL.</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> A MonoReflectionAssembly or NULL if not found
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
This routine invokes the internal System.AppDomain.DoTypeResolve and returns
|
||||||
|
the assembly that matches name.
|
||||||
|
|
||||||
|
If <i>name</i> is null, the value of ((TypeBuilder)tb).FullName is used instead
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_domain_owns_vtable_slot"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_domain_owns_vtable_slot</div>
|
||||||
|
|
||||||
|
<div class="prototype">gboolean
|
||||||
|
mono_domain_owns_vtable_slot (MonoDomain *domain, gpointer vtable_slot)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Returns whenever VTABLE_SLOT is inside a vtable which belongs to DOMAIN.
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Contexts</h3>
|
||||||
|
|
||||||
|
<a name="api:mono_context_get"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_context_get</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_context_get</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
361
docs/deploy/mono-api-dynamic-codegen.html
Normal file
361
docs/deploy/mono-api-dynamic-codegen.html
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-dynamic-codegen.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Dynamic Code Generation</h2>
|
||||||
|
|
||||||
|
<p />The dynamic code generation interface inside the Mono
|
||||||
|
runtime is similar to the API exposed by
|
||||||
|
System.Reflection.Emit.
|
||||||
|
|
||||||
|
<p />This interface is used by Mono internally to generate code
|
||||||
|
on the flight in a cross-platform fashion. For example,
|
||||||
|
P/Invoke marshalling in Mono is implemented in terms of this
|
||||||
|
interface, but it is also used in various other parts of the
|
||||||
|
runtime.
|
||||||
|
|
||||||
|
<p />Unlike Reflection.Emit, the dynamic code generation
|
||||||
|
interface does not start with an assembly builder. The code
|
||||||
|
generation interface starts directly at the method level,
|
||||||
|
which is represented by a pointer to the MonoMethodBuilder
|
||||||
|
structure.
|
||||||
|
|
||||||
|
<p />To JIT this method, the process is this:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Create a <tt>MonoMethodBuilder</tt> object using
|
||||||
|
the <tt>mono_mb_new</tt> method. The method's class
|
||||||
|
is specified as the first argument.
|
||||||
|
|
||||||
|
<li>Create the method signature, using
|
||||||
|
<tt>mono_metadata_signature_alloc</tt>. The call
|
||||||
|
takes the number of arguments that the method takes.
|
||||||
|
Then you must initialize the types for each one of the
|
||||||
|
parameters.
|
||||||
|
|
||||||
|
<li>Emit the CIL code, using one of the
|
||||||
|
<tt>mono_mb_emit_*</tt> functions. There are some
|
||||||
|
helper routines that you can use.
|
||||||
|
|
||||||
|
<li>Create the <tt>MonoMethod</tt> from the
|
||||||
|
<tt>MethodBuilder</tt> using
|
||||||
|
<tt>mono_mb_create_method</tt>.
|
||||||
|
|
||||||
|
<li>Release the <tt>MonoMethodBuilder</tt> resources
|
||||||
|
using mono_mb_free.
|
||||||
|
</li></li></li></li></li></ul>
|
||||||
|
|
||||||
|
<p />The result of this process is a <tt>MonoMethod</tt> which
|
||||||
|
can be called using <tt><a href="api:mono_create_jit_trampoline">mono_create_jit_trampoline</a></tt>
|
||||||
|
routine or can be passed to any other functions that require
|
||||||
|
the MonoMethod.
|
||||||
|
|
||||||
|
<p />Example:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
MonoMethod *adder ()
|
||||||
|
{
|
||||||
|
MonoMethodBuilder *mb;
|
||||||
|
MonoMethodSignature *sig;
|
||||||
|
MonoMethod *method;
|
||||||
|
|
||||||
|
mb = mono_mb_new (mono_defaults.object_class, "adder", MONO_WRAPPER_NONE);
|
||||||
|
|
||||||
|
/* Setup method signature */
|
||||||
|
sig = mono_metadata_signature_alloc (2);
|
||||||
|
sig->ret = &mono_get_int32_class ()->byval_arg;
|
||||||
|
sig->params [0] = &mono_get_int32_class ()->byval_arg;
|
||||||
|
sig->params [1] = &mono_defaults.int32_class->byval_arg;
|
||||||
|
|
||||||
|
/* Emit CIL code */
|
||||||
|
mono_mb_emit_ldarg (mb, 0);
|
||||||
|
mono_mb_emit_ldarg (mb, 1);
|
||||||
|
mono_mb_emit_byte (mb, CEE_ADD);
|
||||||
|
mono_mb_emit_byte (mb, CEE_RET);
|
||||||
|
|
||||||
|
/* Get the method */
|
||||||
|
method = mono_mb_create_method (mb, sig, max_stack);
|
||||||
|
|
||||||
|
/* Cleanup */
|
||||||
|
mono_mb-free (mb);
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<a name="api:mono_mb_new"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_new</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_new</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
<p />The possible values for the <i>type</i> argument are:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
MONO_WRAPPER_NONE
|
||||||
|
MONO_WRAPPER_DELEGATE_INVOKE
|
||||||
|
MONO_WRAPPER_DELEGATE_BEGIN_INVOKE
|
||||||
|
MONO_WRAPPER_DELEGATE_END_INVOKE
|
||||||
|
MONO_WRAPPER_RUNTIME_INVOKE
|
||||||
|
MONO_WRAPPER_NATIVE_TO_MANAGED
|
||||||
|
MONO_WRAPPER_MANAGED_TO_NATIVE
|
||||||
|
MONO_WRAPPER_REMOTING_INVOKE
|
||||||
|
MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK
|
||||||
|
MONO_WRAPPER_XDOMAIN_INVOKE
|
||||||
|
MONO_WRAPPER_XDOMAIN_DISPATCH
|
||||||
|
MONO_WRAPPER_LDFLD
|
||||||
|
MONO_WRAPPER_STFLD
|
||||||
|
MONO_WRAPPER_LDFLD_REMOTE
|
||||||
|
MONO_WRAPPER_STFLD_REMOTE
|
||||||
|
MONO_WRAPPER_SYNCHRONIZED
|
||||||
|
MONO_WRAPPER_DYNAMIC_METHOD
|
||||||
|
MONO_WRAPPER_ISINST
|
||||||
|
MONO_WRAPPER_CASTCLASS
|
||||||
|
MONO_WRAPPER_PROXY_ISINST
|
||||||
|
MONO_WRAPPER_STELEMREF
|
||||||
|
MONO_WRAPPER_UNBOX
|
||||||
|
MONO_WRAPPER_LDFLDA
|
||||||
|
MONO_WRAPPER_UNKNOWN
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</div><h3>Emitting IL</h3>
|
||||||
|
|
||||||
|
<p />Functions that can be used to generate IL on the flight,
|
||||||
|
similar in spirit to System.Reflection.Emit.ILGenerator.
|
||||||
|
|
||||||
|
<a name="api:mono_mb_emit_add_to_local"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_add_to_local</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_add_to_local</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_branch"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_branch</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_branch</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_byte"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_byte</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_byte</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_exception"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_exception</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_exception</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_i2"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_i2</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_i2</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_i4"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_i4</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_i4</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_icon"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_icon</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_icon</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_ldarg_addr"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_ldarg_addr</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_ldarg_addr</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_ldarg"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_ldarg</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_ldarg</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_ldflda"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_ldflda</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_ldflda</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_ldloc_addr"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_ldloc_addr</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_ldloc_addr</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_ldloc"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_ldloc</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_ldloc</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_ldstr"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_ldstr</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_ldstr</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_managed_call"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_managed_call</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_managed_call</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_native_call"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_native_call</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_native_call</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_emit_stloc"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_emit_stloc</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_emit_stloc</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Local variables and Methods</h3>
|
||||||
|
<a name="api:mono_mb_create_method"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_create_method</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoMethod*
|
||||||
|
mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the newly created method.
|
||||||
|
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Create a MonoMethod from this method builder.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_add_data"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_add_data</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_add_data</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_add_local"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_add_local</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_add_local</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_free"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_free</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_free</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Patching Addresses</h3>
|
||||||
|
<a name="api:mono_mb_patch_addr"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_patch_addr</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_patch_addr</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_mb_patch_addr_s"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_mb_patch_addr_s</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_mb_patch_addr_s</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Method Signatures</h3>
|
||||||
|
<a name="api:mono_metadata_signature_alloc"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_metadata_signature_alloc</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_metadata_signature_alloc</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_metadata_signature_dup"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_metadata_signature_dup</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_metadata_signature_dup</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
428
docs/deploy/mono-api-embedding.html
Normal file
428
docs/deploy/mono-api-embedding.html
Normal file
@ -0,0 +1,428 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-embedding.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Embedding Mono</h2>
|
||||||
|
|
||||||
|
<p />The simplest way of embedding Mono is illustrated here:
|
||||||
|
<pre>
|
||||||
|
int main (int argc, char *argv)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Load the default Mono configuration file, this is needed
|
||||||
|
* if you are planning on using the dllmaps defined on the
|
||||||
|
* system configuration
|
||||||
|
*/
|
||||||
|
mono_config_parse (NULL);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* mono_jit_init() creates a domain: each assembly is
|
||||||
|
* loaded and run in a MonoDomain.
|
||||||
|
*/
|
||||||
|
MonoDomain *domain = mono_jit_init ("startup.exe");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Optionally, add an internal call that your startup.exe
|
||||||
|
* code can call, this will bridge startup.exe to Mono
|
||||||
|
*/
|
||||||
|
mono_add_internal_call ("Sample::GetMessage", getMessage);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open the executable, and run the Main method declared
|
||||||
|
* in the executable
|
||||||
|
*/
|
||||||
|
MonoAssembly *assembly = mono_domain_assembly_open (domain, "startup.exe");
|
||||||
|
|
||||||
|
if (!assembly)
|
||||||
|
exit (2);
|
||||||
|
/*
|
||||||
|
* mono_jit_exec() will run the Main() method in the assembly.
|
||||||
|
* The return value needs to be looked up from
|
||||||
|
* System.Environment.ExitCode.
|
||||||
|
*/
|
||||||
|
mono_jit_exec (domain, assembly, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The C# signature for this method is: string GetMessage () in class Sample */
|
||||||
|
MonoString*
|
||||||
|
getMessage ()
|
||||||
|
{
|
||||||
|
return mono_string_new (mono_domain_get (), "Hello, world");
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<a name="api:mono_jit_init"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_jit_init</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_jit_init</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_jit_exec"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_jit_exec</div>
|
||||||
|
|
||||||
|
<div class="prototype">int
|
||||||
|
mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>assembly:</i></dt><dd> reference to an assembly</dd><dt><i>argc:</i></dt><dd> argument count</dd><dt><i>argv:</i></dt><dd> argument vector</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Start execution of a program.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_set_dirs"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_set_dirs</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_set_dirs (const char *assembly_dir, const char *config_dir)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>assembly_dir:</i></dt><dd> the base directory for assemblies</dd><dt><i>config_dir:</i></dt><dd> the base directory for configuration files</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
This routine is used internally and by developers embedding
|
||||||
|
the runtime into their own applications.
|
||||||
|
|
||||||
|
There are a number of cases to consider: Mono as a system-installed
|
||||||
|
package that is available on the location preconfigured or Mono in
|
||||||
|
a relocated location.
|
||||||
|
|
||||||
|
If you are using a system-installed Mono, you can pass NULL
|
||||||
|
to both parameters. If you are not, you should compute both
|
||||||
|
directory values and call this routine.
|
||||||
|
|
||||||
|
The values for a given PREFIX are:
|
||||||
|
|
||||||
|
assembly_dir: PREFIX/lib
|
||||||
|
config_dir: PREFIX/etc
|
||||||
|
|
||||||
|
Notice that embedders that use Mono in a relocated way must
|
||||||
|
compute the location at runtime, as they will be in control
|
||||||
|
of where Mono is installed.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_main"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_main</div>
|
||||||
|
|
||||||
|
<div class="prototype">int
|
||||||
|
mono_main (int argc, char* argv[])
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>argc:</i></dt><dd> number of arguments in the argv array</dd><dt><i>argv:</i></dt><dd> array of strings containing the startup arguments</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Launches the Mono JIT engine and parses all the command line options
|
||||||
|
in the same way that the mono command line VM would.
|
||||||
|
|
||||||
|
</div> <a name="api:mono_parse_default_optimizations"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_parse_default_optimizations</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_parse_default_optimizations</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_jit_cleanup"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_jit_cleanup</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_jit_cleanup</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_set_defaults"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_set_defaults</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_set_defaults</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Internal Calls</h3>
|
||||||
|
|
||||||
|
<p />The Mono runtime provides two mechanisms to expose C code
|
||||||
|
to the CIL universe: internal calls and native C
|
||||||
|
code. Internal calls are tightly integrated with the runtime,
|
||||||
|
and have the least overhead, as they use the same data types
|
||||||
|
that the runtime uses.
|
||||||
|
|
||||||
|
<p />The other option is to use the Platform Invoke (P/Invoke)
|
||||||
|
to call C code from the CIL universe, using the standard
|
||||||
|
<a href="http://www.mono-project.com/Interop_with_Native_Libraries">P/Invoke</a>
|
||||||
|
mechanisms.
|
||||||
|
|
||||||
|
<p />To register an internal call, use this call you use the
|
||||||
|
<a href="#api:mono_add_internal_call"><tt>mono_add_internal_call</tt>
|
||||||
|
routine.
|
||||||
|
|
||||||
|
<a name="api:mono_add_internal_call"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_add_internal_call</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_add_internal_call</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>P/Invoke with embedded applications</h3>
|
||||||
|
|
||||||
|
<p />Unlike internal calls, Platform/Invoke is easier to use and
|
||||||
|
more portable. It allows you to share code with Windows and
|
||||||
|
.NET that have a different setup for internal calls to their
|
||||||
|
own runtime.
|
||||||
|
|
||||||
|
<p />Usually P/Invoke declarations reference external libraries
|
||||||
|
like:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
[DllImport ("opengl")]
|
||||||
|
void glBegin (GLEnum mode)
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p />Mono extends P/Invoke to support looking up symbols not in
|
||||||
|
an external library, but looking up those symbols into the
|
||||||
|
same address space as your program, to do this, use the
|
||||||
|
special library name "__Internal". This will direct Mono to
|
||||||
|
lookup the method in your own process.
|
||||||
|
|
||||||
|
<p />There are situations where the host operating system does
|
||||||
|
not support looking up symbols on the process address space.
|
||||||
|
For situations like this you can use
|
||||||
|
the <a href="#api:mono_dl_register_library">mono_dl_register_library</a>.
|
||||||
|
|
||||||
|
<h4><a name="api:mono_dl_register_library">mono_dl_register_library</a></h4>
|
||||||
|
|
||||||
|
<h3>Data Marshalling</h3>
|
||||||
|
|
||||||
|
<p />Managed objects are represented as <tt>MonoObject*</tt>
|
||||||
|
types. Those objects that the runtime consumes directly have
|
||||||
|
more specific C definitions (for example strings are of type
|
||||||
|
<tt>MonoString *</tt>, delegates are of type
|
||||||
|
<tt>MonoDelegate*</tt> but they are still <tt>MonoObject
|
||||||
|
*</tt>s).
|
||||||
|
|
||||||
|
<p />As of Mono 1.2.x types defined in mscorlib.dll do not have
|
||||||
|
their fields reordered in any way. But other libraries might
|
||||||
|
have their fields reordered. In these cases, Managed
|
||||||
|
structures and objects have the same layout in the C# code as
|
||||||
|
they do in the unmanaged world.
|
||||||
|
|
||||||
|
<p />Structures defined outside corlib must have a specific
|
||||||
|
StructLayout definition, and have it set as sequential if you
|
||||||
|
plan on accessing these fields directly from C code.
|
||||||
|
|
||||||
|
<p /><b>Important</b> Internal calls do not provide support for
|
||||||
|
marshalling structures. This means that any API calls that
|
||||||
|
take a structure (excluding the system types like int32,
|
||||||
|
int64, etc) must be passed as a pointer, in C# this means
|
||||||
|
passing the value as a "ref" or "out" parameter.
|
||||||
|
|
||||||
|
<h3>Mono Runtime Configuration</h3>
|
||||||
|
|
||||||
|
<p />Certain features of the Mono runtime, like DLL mapping, are
|
||||||
|
available through a configuration file that is loaded at
|
||||||
|
runtime. The default Mono implementation loads the
|
||||||
|
configuration file from <tt>$sysconfig/mono/config</tt>
|
||||||
|
(typically this is <tt>/etc/mono/config</tt>).
|
||||||
|
|
||||||
|
<p />See the <tt>mono-config(5)</tt> man page for more details
|
||||||
|
on what goes in this file.
|
||||||
|
|
||||||
|
<p />The following APIs expose this functionality:
|
||||||
|
|
||||||
|
<a name="api:mono_config_parse"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_config_parse</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_config_parse (const char *filename)
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>filename:</i></dt><dd> the filename to load the configuration variables from.</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Pass a NULL filename to parse the default config files
|
||||||
|
(or the file in the MONO_CONFIG env var).
|
||||||
|
|
||||||
|
</div> <a name="api:mono_config_parse_memory"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_config_parse_memory</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_config_parse_memory (const char *buffer)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>buffer:</i></dt><dd> a pointer to an string XML representation of the configuration</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Parses the configuration from a buffer
|
||||||
|
|
||||||
|
</div> <a name="api:mono_get_config_dir"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_get_config_dir</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_get_config_dir</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Function Pointers</h3>
|
||||||
|
|
||||||
|
<p />To wrap a function pointer into something that the Mono
|
||||||
|
runtime can consume, you should use the mono_create_ftnptr.
|
||||||
|
This is only important if you plan on running on the IA64
|
||||||
|
architecture. Otherwise you can just use the function
|
||||||
|
pointer address.
|
||||||
|
|
||||||
|
<a name="api:mono_create_ftnptr"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_create_ftnptr</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_create_ftnptr</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
|
||||||
|
</div><h3>Advanced Execution Setups</h3>
|
||||||
|
|
||||||
|
<p />These are not recommended ways of initializing Mono, they
|
||||||
|
are done internally by mono_jit_init, but are here to explain
|
||||||
|
what happens internally.
|
||||||
|
|
||||||
|
<a name="api:mono_runtime_exec_managed_code"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_runtime_exec_managed_code</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_runtime_exec_managed_code (MonoDomain *domain,
|
||||||
|
MonoMainThreadFunc main_func,
|
||||||
|
gpointer main_args)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain:</i></dt><dd> Application domain</dd><dt><i>main_func:</i></dt><dd> function to invoke from the execution thread</dd><dt><i>main_args:</i></dt><dd> parameter to the main_func</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Launch a new thread to execute a function
|
||||||
|
|
||||||
|
main_func is called back from the thread with main_args as the
|
||||||
|
parameter. The callback function is expected to start Main()
|
||||||
|
eventually. This function then waits for all managed threads to
|
||||||
|
finish.
|
||||||
|
It is not necesseray anymore to execute managed code in a subthread,
|
||||||
|
so this function should not be used anymore by default: just
|
||||||
|
execute the code and then call mono_thread_manage ().
|
||||||
|
|
||||||
|
</div> <a name="api:mono_runtime_exec_main"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_runtime_exec_main</div>
|
||||||
|
|
||||||
|
<div class="prototype">Prototype: mono_runtime_exec_main</div>
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_init_from_assembly"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_init_from_assembly</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoDomain*
|
||||||
|
mono_init_from_assembly (const char *domain_name, const char *filename)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>domain_name:</i></dt><dd> name to give to the initial domain</dd><dt><i>filename:</i></dt><dd> filename to load on startup</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the initial domain.
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Used by the runtime, users should use mono_jit_init instead.
|
||||||
|
|
||||||
|
Creates the initial application domain and initializes the mono_defaults
|
||||||
|
structure.
|
||||||
|
This function is guaranteed to not run any IL code.
|
||||||
|
The runtime is initialized using the runtime version required by the
|
||||||
|
provided executable. The version is determined by looking at the exe
|
||||||
|
configuration file and the version PE field)
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_init"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_init</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoDomain*
|
||||||
|
mono_init (const char *domain_name)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the initial domain.
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p /> <p />
|
||||||
|
|
||||||
|
Creates the initial application domain and initializes the mono_defaults
|
||||||
|
structure.
|
||||||
|
This function is guaranteed to not run any IL code.
|
||||||
|
The runtime is initialized using the default runtime version.
|
||||||
|
|
||||||
|
|
||||||
|
</div></a></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
694
docs/deploy/mono-api-exc.html
Normal file
694
docs/deploy/mono-api-exc.html
Normal file
File diff suppressed because it is too large
Load Diff
119
docs/deploy/mono-api-gc.html
Normal file
119
docs/deploy/mono-api-gc.html
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-gc.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Garbage Collector Interface</h1>
|
||||||
|
|
||||||
|
<h1>Public Interface</h1>
|
||||||
|
|
||||||
|
<p />The public interface of the Mono GC is fairly limited, and
|
||||||
|
its the only one that embedders should be using:
|
||||||
|
|
||||||
|
<a name="api:mono_gc_collect"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_gc_collect</div>
|
||||||
|
|
||||||
|
<div class="prototype">void
|
||||||
|
mono_gc_collect (int generation)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>generation:</i></dt><dd> GC generation identifier</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Perform a garbage collection for the given generation, higher numbers
|
||||||
|
mean usually older objects. Collecting a high-numbered generation
|
||||||
|
implies collecting also the lower-numbered generations.
|
||||||
|
The maximum value for <i>generation</i> can be retrieved with a call to
|
||||||
|
mono_gc_max_generation(), so this function is usually called as:
|
||||||
|
|
||||||
|
mono_gc_collect (mono_gc_max_generation ());
|
||||||
|
|
||||||
|
</div> <a name="api:mono_gc_max_generation"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_gc_max_generation</div>
|
||||||
|
|
||||||
|
<div class="prototype">int
|
||||||
|
mono_gc_max_generation (void)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the maximum generation number.
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Get the maximum generation number used by the current garbage
|
||||||
|
collector. The value will be 0 for the Boehm collector, 1 or more
|
||||||
|
for the generational collectors.
|
||||||
|
|
||||||
|
|
||||||
|
</div> <a name="api:mono_gc_get_heap_size"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_gc_get_heap_size</div>
|
||||||
|
|
||||||
|
<div class="prototype">int64_t
|
||||||
|
mono_gc_get_heap_size (void)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> the size of the heap in bytes
|
||||||
|
</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
Get the amount of memory used by the garbage collector.
|
||||||
|
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
228
docs/deploy/mono-api-gchandle.html
Normal file
228
docs/deploy/mono-api-gchandle.html
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><span>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>mono-api-gchandle.html</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-bottom: 4pt;
|
||||||
|
border-bottom: 2px solid #dddddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 10pt;
|
||||||
|
margin: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-entry {
|
||||||
|
border-bottom: none;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prototype {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
padding: 5pt;
|
||||||
|
margin-top: 5pt;
|
||||||
|
margin-bottom: 5pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code {
|
||||||
|
border: 1px solid;
|
||||||
|
padding: 0 0 5pt 5pt;
|
||||||
|
margin: 10pt;
|
||||||
|
white-space: pre;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>GC Handles</h1>
|
||||||
|
|
||||||
|
<h3>Synopsys</h3>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
guint32 <a href="#api:mono_gchandle_new">mono_gchandle_new</a> (MonoObject *obj,
|
||||||
|
gboolean pinned);
|
||||||
|
guint32 <a href="#api:mono_gchandle_new_weakref">mono_gchandle_new_weakref</a> (MonoObject *obj,
|
||||||
|
gboolean track_resurrection);
|
||||||
|
MonoObject* <a href="#api:mono_gchandle_get_target">mono_gchandle_get_target</a> (guint32 gchandle);
|
||||||
|
void <a href="#api:mono_gchandle_free">mono_gchandle_free</a> (guint32 gchandle);
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />GC handles are wrappers that are used to keep references to
|
||||||
|
managed objects in the unmanaged space and preventing the
|
||||||
|
object from being disposed.
|
||||||
|
|
||||||
|
<p />These are the C equivalents of the <tt>System.GCHandle</tt>
|
||||||
|
structure.
|
||||||
|
|
||||||
|
<p />There are two kinds of GCHandles that can be created:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Handles to objects (use <tt><a href="#api:mono_gchandle_new">mono_gchandle_new</a></tt>).
|
||||||
|
|
||||||
|
<li>Weak handles to objects (use <tt><a href="#api:mono_gchandle_new_weakref">mono_gchandle_new_weakref</a></tt>).
|
||||||
|
Weak handles can have the objects reclaimed by the
|
||||||
|
garbage collector.
|
||||||
|
|
||||||
|
</li></li></ul>
|
||||||
|
|
||||||
|
<p />To retrieve the target address of an object pointed to by a
|
||||||
|
<tt>GCHandle</tt> you should use
|
||||||
|
<tt>mono_gchandle_get_target</tt>.
|
||||||
|
|
||||||
|
<p />For example, consider the following C code:
|
||||||
|
<div class="code">
|
||||||
|
static MonoObject* o = NULL;
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />The object in `o' will *NOT* be scanned.
|
||||||
|
|
||||||
|
<p />If you need to store an object in a C variable and prevent
|
||||||
|
it from being collected, you need to acquire a GC handle for
|
||||||
|
it.
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
guint32 handle = mono_gchandle_new (my_object, TRUE);
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />TRUE means the object will be pinned, so it won't move in
|
||||||
|
memory when we'll use a moving GC. You can access the
|
||||||
|
MonoObject* referenced by a handle with:
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
MonoObject* obj = mono_gchandle_get_target (handle);
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />When you don't need the handle anymore you need to call:
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
mono_gchandle_free (handle);
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />Note that if you assign a new object to the C var, you need
|
||||||
|
to get a new handle, it's not enough to store a new object in
|
||||||
|
the C var.
|
||||||
|
|
||||||
|
<p />So code that looked like this:
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
static MonoObject* o = NULL;
|
||||||
|
...
|
||||||
|
o = mono_object_new (...);
|
||||||
|
/* use o */
|
||||||
|
...
|
||||||
|
/* when done to allow the GC to collect o */
|
||||||
|
o = NULL;
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p />should now be changed to:
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
static guint32 o_handle;
|
||||||
|
...
|
||||||
|
MonoObject *o = mono_object_new (...);
|
||||||
|
o_handle = mono_gchandle_new (o, TRUE);
|
||||||
|
/* use o or mono_gchandle_get_target (o_handle) */
|
||||||
|
...
|
||||||
|
/* when done to allow the GC to collect o */
|
||||||
|
mono_gchandle_free (o_handle);
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a name="api:mono_gchandle_new"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_gchandle_new</div>
|
||||||
|
|
||||||
|
<div class="prototype">guint32
|
||||||
|
mono_gchandle_new (MonoObject *obj, gboolean pinned)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>obj:</i></dt><dd> managed object to get a handle for</dd><dt><i>pinned:</i></dt><dd> whether the object should be pinned</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> a handle that can be used to access the object from
|
||||||
|
|
||||||
|
unmanaged code.</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
This returns a handle that wraps the object, this is used to keep a
|
||||||
|
reference to a managed object from the unmanaged world and preventing the
|
||||||
|
object from being disposed.
|
||||||
|
|
||||||
|
<p />
|
||||||
|
If <i>pinned</i> is false the address of the object can not be obtained, if it is
|
||||||
|
true the address of the object can be obtained. This will also pin the
|
||||||
|
object so it will not be possible by a moving garbage collector to move the
|
||||||
|
object.
|
||||||
|
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_gchandle_new_weakref"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_gchandle_new_weakref</div>
|
||||||
|
|
||||||
|
<div class="prototype">guint32
|
||||||
|
mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>obj:</i></dt><dd> managed object to get a handle for</dd><dt><i>pinned:</i></dt><dd> whether the object should be pinned</dd></blockquote>
|
||||||
|
<b>Returns</b>
|
||||||
|
<blockquote> a handle that can be used to access the object from
|
||||||
|
|
||||||
|
unmanaged code.</blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
This returns a weak handle that wraps the object, this is used to
|
||||||
|
keep a reference to a managed object from the unmanaged world.
|
||||||
|
Unlike the mono_gchandle_new the object can be reclaimed by the
|
||||||
|
garbage collector. In this case the value of the GCHandle will be
|
||||||
|
set to zero.
|
||||||
|
|
||||||
|
<p />
|
||||||
|
If <i>pinned</i> is false the address of the object can not be obtained, if it is
|
||||||
|
true the address of the object can be obtained. This will also pin the
|
||||||
|
object so it will not be possible by a moving garbage collector to move the
|
||||||
|
object.
|
||||||
|
|
||||||
|
<p />
|
||||||
|
|
||||||
|
</div> <a name="api:mono_gchandle_get_target"></a>
|
||||||
|
<div class="api">
|
||||||
|
<div class="api-entry">mono_gchandle_get_target</div>
|
||||||
|
|
||||||
|
<div class="prototype">MonoObject*
|
||||||
|
mono_gchandle_get_target (guint32 gchandle)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p />
|
||||||
|
<b>Parameters</b>
|
||||||
|
<blockquote><dt><i>gchandle:</i></dt><dd> a GCHandle's handle.</dd></blockquote>
|
||||||
|
<b>Remarks</b>
|
||||||
|
<p />
|
||||||
|
The handle was previously created by calling mono_gchandle_new or
|
||||||
|
mono_gchandle_new_weakref.
|
||||||
|
|
||||||
|
Returns a pointer to the MonoObject represented by the handle or
|
||||||
|
NULL for a collected object if using a weakref handle.
|
||||||
|
|
||||||
|
</div></body>
|
||||||
|
</html>
|
||||||
|
</span>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user