+2009-05-12 Kornél Pál <kornelpal@gmail.com>
+
+ * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
+ prevous wait that resulted in a deadlock on Windows when initializing
+ the runtime form DllMain. Also results in improved startup time.
+ (finalizer_thread): Get rid of thread_started_event.
+ * threads.c, threads-types.h (mono_thread_create_internal): Return the
+ resulting MonoThread.
+
+ Contributed under MIT/X11 license.
+
2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
* metadata-verify.c: Verify the implmap table.
Fixes #448560.
-2008-11-29 Korn�l P�l <kornelpal@gmail.com>
+2008-11-29 Kornél Pál <kornelpal@gmail.com>
* coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
for the no-gc case.
* attach.c (mono_attach_init): Remove the #ifdef.
-2008-10-04 Andreas F�rber <andreas.faerber@web.de>
+2008-10-04 Andreas Färber <andreas.faerber@web.de>
* attach.c (mono_attach_init): Don't use
mono_gc_add_finalizer_thread_callback when compiling without GC.
(mono_image_get_generic_field_token): Call add_custom_modifiers ().
(fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
-2008-09-19 Korn�l P�l <kornelpal@gmail.com>
+2008-09-19 Kornél Pál <kornelpal@gmail.com>
* coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
(ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
New internal calls to duplicate and close a process handle.
-2008-07-27 Andreas F�rber <andreas.faerber@web.de>
+2008-07-27 Andreas Färber <andreas.faerber@web.de>
* object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
* class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
for the case where the exception object is supplied.
-2008-07-16 Korn�l P�l <kornelpal@gmail.com>
+2008-07-16 Kornél Pál <kornelpal@gmail.com>
* coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
old ld versions.
* domain.c: Initialize+cleanup jit_code_hash_lock.
-2008-06-30 Korn�l P�l <kornelpal@gmail.com>
+2008-06-30 Kornél Pál <kornelpal@gmail.com>
* coree.c (mono_load_coree): Set coree_module_handle global variable only
after initialization.
Contributed under MIT/X11 license.
-2008-06-30 Korn�l P�l <kornelpal@gmail.com>
+2008-06-30 Kornél Pál <kornelpal@gmail.com>
* coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
because that is platform independent. Check NumberOfRvaAndSizes in PE32
* object.c (mono_value_box): Fix boxing of nullables.
-2008-06-26 Korn�l P�l <kornelpal@gmail.com>
+2008-06-26 Kornél Pál <kornelpal@gmail.com>
* assembly.c (mono_set_rootdir): Use __ImageBase instead of
mono_module_handle that is defined by the linker; no initialization required.
* icall-def.h: Implement Socket generic Send() and Receive()
methods. Fixes bug 395168.
-2008-06-19 Korn�l P�l <kornelpal@gmail.com>
+2008-06-19 Kornél Pál <kornelpal@gmail.com>
* icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
* appdomain.c (set_domain_search_path): Acquire the domain lock since we
modify domain state.
-2008-06-05 Andreas F�rber <andreas.faerber@web.de>
+2008-06-05 Andreas Färber <andreas.faerber@web.de>
* boehm-gc.c: Add DTrace probes gc-{begin,end}.
* Makefile.am (pedump_LDADD): Post-process object files and
* reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
it to avoid registering tokens during metadata generation. Fixes #390023.
-2008-05-14 Korn�l P�l <kornelpal@gmail.com>
+2008-05-14 Kornél Pál <kornelpal@gmail.com>
* coree.c: Rename dwOldProtect to OldProtect that makes naming convention
consistent.
Contributed under MIT/X11 license.
-2008-05-14 Korn�l P�l <kornelpal@gmail.com>
+2008-05-14 Kornél Pál <kornelpal@gmail.com>
* domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
(MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
for old pre-terrania symbol files.
-2008-05-05 Andreas F�rber <andreas.faerber@web.de>
+2008-05-05 Andreas Färber <andreas.faerber@web.de>
* mono-config.c: Add ppc64 architecture.
Code is contributed under MIT/X11 license.
-2008-05-05 Andreas F�rber <andreas.faerber@web.de>
+2008-05-05 Andreas Färber <andreas.faerber@web.de>
* object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
PPC64 uses function descriptors as well.
* verify.c (mono_method_verify): Check the bounds of
all access of the code array.
-2008-04-29 Korn�l P�l <kornelpal@gmail.com>
+2008-04-29 Kornél Pál <kornelpal@gmail.com>
* appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
* image.c (mono_image_strong_name_position): Fix return value when the rva is
not valid.
-2008-04-28 Korn�l P�l <kornelpal@gmail.com>
+2008-04-28 Kornél Pál <kornelpal@gmail.com>
* loader.c (mono_get_method_from_token, mono_method_signature): Add
support for METHOD_IMPL_ATTRIBUTE_NATIVE.
* verify.c: Implemented readonly prefix and verify controled mutability pointers.
-2008-03-20 Korn�l P�l <kornelpal@gmail.com>
+2008-03-20 Kornél Pál <kornelpal@gmail.com>
* file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
version macros.
* socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
to succeed
-2007-11-05 Korn�l P�l <kornelpal@gmail.com>
+2007-11-05 Kornél Pál <kornelpal@gmail.com>
* process.c: Added run-time GetProcessId API detection for Windows.
* threads.c (start_wrapper): Do the thread cleanup while we still
hold a reference to its object. Fixes bug 78123.
-2006-07-18 Korn�l P�l <kornelpal@gmail.com>
+2006-07-18 Kornél Pál <kornelpal@gmail.com>
* class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
* debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
* threads.c: avoid segfault when an unstarted thread is aborted.
-2005-06-05 Korn�l P�l <kornelpal@hotmail.com>
+2005-06-05 Kornél Pál <kornelpal@hotmail.com>
* icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
Returns the name and version of the runtime for reporting.
#ifndef HAVE_NULL_GC
static HANDLE pending_done_event;
static HANDLE shutdown_event;
-static HANDLE thread_started_event;
#endif
static void
static guint32
finalizer_thread (gpointer unused)
{
- gc_thread = mono_thread_current ();
-
- SetEvent (thread_started_event);
-
while (!finished) {
/* Wait to be notified that there's at least one
* finaliser to run
finalizer_event = CreateEvent (NULL, FALSE, FALSE, NULL);
pending_done_event = CreateEvent (NULL, TRUE, FALSE, NULL);
shutdown_event = CreateEvent (NULL, TRUE, FALSE, NULL);
- thread_started_event = CreateEvent (NULL, TRUE, FALSE, NULL);
- if (finalizer_event == NULL || pending_done_event == NULL || shutdown_event == NULL || thread_started_event == NULL) {
+ if (finalizer_event == NULL || pending_done_event == NULL || shutdown_event == NULL) {
g_assert_not_reached ();
}
#if USE_POSIX_SEM
sem_init (&finalizer_sem, 0, 0);
#endif
- mono_thread_create (mono_domain_get (), finalizer_thread, NULL);
-
- /*
- * Wait until the finalizer thread sets gc_thread since its value is needed
- * by mono_thread_attach ()
- *
- * FIXME: Eliminate this as to avoid some deadlocks on windows.
- * Waiting for a new thread should result in a deadlock when the runtime is
- * initialized from _CorDllMain that is called while the OS loader lock is
- * held by LoadLibrary.
- */
- WaitForSingleObjectEx (thread_started_event, INFINITE, FALSE);
+ gc_thread = mono_thread_create_internal (mono_domain_get (), finalizer_thread, NULL, FALSE);
}
void