1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
From f919c3301fabbaa5d965dcc7b1c3d6892a8c730a Mon Sep 17 00:00:00 2001
From: Keno Fischer <keno@juliacomputing.com>
Date: Sat, 14 Mar 2020 12:05:19 +0100
---
driver/others/memory.c | 131 +----------------------------------------
1 file changed, 2 insertions(+), 129 deletions(-)
diff --git a/driver/others/memory.c b/driver/others/memory.c
index 62a5a021..23f8fe65 100644
--- a/driver/others/memory.c
+++ b/driver/others/memory.c
@@ -1510,7 +1510,7 @@ void CONSTRUCTOR gotoblas_init(void) {
}
-void DESTRUCTOR gotoblas_quit(void) {
+void gotoblas_quit(void) {
if (gotoblas_initialized == 0) return;
@@ -1547,74 +1547,12 @@ void DESTRUCTOR gotoblas_quit(void) {
#endif
}
-#if defined(_MSC_VER) && !defined(__clang__)
-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
-{
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- gotoblas_init();
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
-#if defined(SMP)
- blas_thread_memory_cleanup();
-#endif
- break;
- case DLL_PROCESS_DETACH:
- gotoblas_quit();
- break;
- default:
- break;
- }
- return TRUE;
-}
-
-/*
- This is to allow static linking.
- Code adapted from Google performance tools:
- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc
- Reference:
- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html
- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp
-*/
-static int on_process_term(void)
-{
- gotoblas_quit();
- return 0;
-}
#ifdef _WIN64
#pragma comment(linker, "/INCLUDE:_tls_used")
#else
#pragma comment(linker, "/INCLUDE:__tls_used")
#endif
-#ifdef _WIN64
-#pragma const_seg(".CRT$XLB")
-#else
-#pragma data_seg(".CRT$XLB")
-#endif
-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
-#ifdef _WIN64
-#pragma const_seg()
-#else
-#pragma data_seg()
-#endif
-
-#ifdef _WIN64
-#pragma const_seg(".CRT$XTU")
-#else
-#pragma data_seg(".CRT$XTU")
-#endif
-static int(*p_process_term)(void) = on_process_term;
-#ifdef _WIN64
-#pragma const_seg()
-#else
-#pragma data_seg()
-#endif
-#endif
-
#if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64))
/* Don't call me; this is just work around for PGI / Sun bug */
void gotoblas_dummy_for_PGI(void) {
@@ -3104,7 +3042,7 @@ void CONSTRUCTOR gotoblas_init(void) {
}
-void DESTRUCTOR gotoblas_quit(void) {
+void gotoblas_quit(void) {
if (gotoblas_initialized == 0) return;
@@ -3133,71 +3071,6 @@ void DESTRUCTOR gotoblas_quit(void) {
#endif
}
-#if defined(_MSC_VER) && !defined(__clang__)
-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
-{
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- gotoblas_init();
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- gotoblas_quit();
- break;
- default:
- break;
- }
- return TRUE;
-}
-
-/*
- This is to allow static linking.
- Code adapted from Google performance tools:
- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc
- Reference:
- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html
- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp
-*/
-static int on_process_term(void)
-{
- gotoblas_quit();
- return 0;
-}
-#ifdef _WIN64
-#pragma comment(linker, "/INCLUDE:_tls_used")
-#else
-#pragma comment(linker, "/INCLUDE:__tls_used")
-#endif
-
-#ifdef _WIN64
-#pragma const_seg(".CRT$XLB")
-#else
-#pragma data_seg(".CRT$XLB")
-#endif
-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain;
-#ifdef _WIN64
-#pragma const_seg()
-#else
-#pragma data_seg()
-#endif
-
-#ifdef _WIN64
-#pragma const_seg(".CRT$XTU")
-#else
-#pragma data_seg(".CRT$XTU")
-#endif
-static int(*p_process_term)(void) = on_process_term;
-#ifdef _WIN64
-#pragma const_seg()
-#else
-#pragma data_seg()
-#endif
-#endif
-
#if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64))
/* Don't call me; this is just work around for PGI / Sun bug */
void gotoblas_dummy_for_PGI(void) {
|