summaryrefslogtreecommitdiff
path: root/dll.c
diff options
context:
space:
mode:
Diffstat (limited to 'dll.c')
-rw-r--r--dll.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/dll.c b/dll.c
index d26f8fd..f2b3505 100644
--- a/dll.c
+++ b/dll.c
@@ -10,12 +10,17 @@
#include "implement.h"
-/* Function pointer to TryEnterCriticalSection if it exists; otherwise NULL */
+/*
+ * Function pointer to TryEnterCriticalSection if it exists; otherwise NULL
+ */
BOOL (WINAPI *_pthread_try_enter_critical_section)(LPCRITICAL_SECTION) = NULL;
-/* Handle to kernel32.dll */
+/*
+ * Handle to kernel32.dll
+ */
static HINSTANCE _pthread_h_kernel32;
+
#ifdef _MSC_VER
/*
* lpvReserved yields an unreferenced formal parameter;
@@ -89,11 +94,11 @@ DllMain (
* The DLL is being unmapped into the process's address space
*/
_pthread_processTerminate ();
+
+ (void) FreeLibrary(_pthread_h_kernel32);
}
}
- (void) FreeLibrary(_pthread_h_kernel32);
-
result = TRUE;
}
break;