[Mono-dev] Mixed Mode Assemblies
robertj at gmx.net
Wed Jul 20 12:41:11 EDT 2011
On 20.07.2011 18:02, Tom Spink wrote:
> Hi guys,
> Since it's only 3.5k tarred up, I've attached it to this email - I hope
> that's not too rude!
> Let me know what you think! And don't give me a hard time for some of the
> hacks ;)
I'm quoting from the TODO:
> * Automate DLL_NAME to pull it from somewhere.
We could store the necessary runtime version and the assembly
name in the generated C++ stub, then use mono_jit_init_version
> * Rewrite each stub after first call to call the function pointer
> proper, and hence bypass the NULL test.
I'm biased whether this is necessary altogether.
Is it a burden for the SO user if we'd require a first call
of an provided initialization function?
This function could be even called automatically, unless
we really want to postpone mono's initialization.
> * Think about multiple loaded assemblies, and the impact that will have
> on loading the runtime/appdomain twice.
Maybe we should propose a mono_jit_is_initialized() for libmono,
unless there is already a way to detect this, that we're not aware of.
> * Think about multi-threading, and how to invoke mono_thread_attach.
IIRC, when I wrote the thunk support, I've reused a method
wrapper type that already performs mono_thread_attach()
on managed/unmanaged boundaries. I even wanted to introduce a
new wrapper type to get rid of mono_thread_attach() for performance
reasons, but never did it.
More information about the Mono-devel-list