[Mono-dev] [PATCH] Add mixed-mode assembly support on Windows (now build with cygwin as well)
kornelpal at gmail.com
Fri Apr 25 05:49:32 EDT 2008
Previously I forgot to try _CorDllMain to load the runtime when it hasn't
been loaded yet. As a result I found that thread_started_event in
mono/mono/metadata/gc.c causes a deadlock in this situation because
_CorDllMain is callled while the OS loader lock is held by the current
thread and no new threads are started while OS loader lock is held. After
examining the purpose of thread_started_event I found that unlike the
comment states it is not required at all so I removed it completely. This
will make startup faster as well. I also checked that finalizer_thread is
called and reaches SetEvent (shutdown_event) at the end.
My test confirmed that Mono even supports mixed-mode assemblies with
exported symbols if they were native DLLs just like MS.NET does.
----- Original Message -----
From: Kornél Pál
Sent: Friday, April 25, 2008 12:31 AM
Subject: Re: [Mono-dev] [PATCH] Add mixed-mode assembly support on Windows
(now build with cygwin as well)
> I also modified Makefile to export __stdcall functions without mangling
> create-windef.pl to include MonoFixupCorEE. Other than these there are no
> ----- Original Message -----
> From: Kornél Pál
> To: mono-devel; Robert Jordan
> Sent: Wednesday, April 23, 2008 2:40 PM
> Subject: Re: [Mono-dev] [PATCH] Add mixed-mode assembly support on Windows
> (now build with cygwin as well)
>>> From: Robert Jordan
>>>I think the following code is from another patch set (the cmd line
>>>encoding issue you sent a patch for). Is it complete?
>>> Index: mono/mono/mini/main.c
>> Yes, it is. I included it in this patch to be consistent with _CorExeMain
>> implementation. Also note that command line arguments are parsed as UTF-8
>> without MONO_EXTERNAL_ENCODINGS. MONO_EXTERNAL_ENCODINGS should not be
>> supported on Windows, Unicode API should be used instead. Patching main
>> make Mono support non-ASCII command line arguments on Windows. Also note
>> that because images are loaded using LoadLibrary file names are expected
>> be in UTF-8 that is supported by this main function patch. I still would
>> vote for removing MONO_EXTERNAL_ENCODINGS support on Windows but that is
>> of the scope of this patch.
>>>If this is solved, I will try to fix the cygwin build.
>> I managed to fix the build. #include <config.h> had to be moved out of
>> #ifdef PLATFORM_WIN32 because PLATFORM_WIN32 is defined in config.h in
>> cygwin build.
>> Please review the patch. Please try it on Linux as well to make sure that
>> doesn't break Linux. And if you like it, please approve the patch.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Mono-devel-list