diff options
author | Zoltan Varga <vargaz@gmail.com> | 2005-08-25 17:48:41 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2005-08-25 17:48:41 +0400 |
commit | f392aa93cf3184f8b44eec15b9b4947d22434e61 (patch) | |
tree | 044581d8db9f19cf004d5b91beca0761e581b2ca /libgc/win32_threads.c | |
parent | 657baf976f2b2aa9fa7baefe5af6ffe673d1056c (diff) |
2005-08-24 Zoltan Varga <vargaz@gmail.com>
* win32_threads.c: If GC_INSIDE_DLL is defined, define the DllMain function for automatic registration
of threads with the GC.
* configure.in: Add an option for turning GC_INSIDE_DLL on.
svn path=/trunk/mono/; revision=48831
Diffstat (limited to 'libgc/win32_threads.c')
-rw-r--r-- | libgc/win32_threads.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libgc/win32_threads.c b/libgc/win32_threads.c index 681e1c2b82e..3195094cc11 100644 --- a/libgc/win32_threads.c +++ b/libgc/win32_threads.c @@ -74,7 +74,13 @@ extern LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info); int GC_thread_is_registered (void) { +#if defined(GC_DLL) || defined(GC_INSIDE_DLL) + /* Registered by DllMain */ return 1; +#else + /* FIXME: */ + return 0; +#endif } /* @@ -753,7 +759,7 @@ int GC_pthread_detach(pthread_t thread) * We avoid acquiring locks here, since this doesn't seem to be preemptable. * Pontus Rydin suggests wrapping the thread start routine instead. */ -#ifdef GC_DLL +#if defined(GC_DLL) || defined(GC_INSIDE_DLL) BOOL WINAPI DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved) { switch (reason) { |