File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,12 @@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-skylakexdgemm.patch-applied: $(BUILDDIR
99
99
patch -p1 -f < $(SRCDIR ) /patches/openblas-skylakexdgemm.patch
100
100
echo 1 > $@
101
101
102
- $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /build-configured : $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /openblas-skylakexdgemm.patch-applied
102
+ $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /openblas-winexit.patch-applied : $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /source-extracted
103
+ cd $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) && \
104
+ patch -p1 -f < $(SRCDIR ) /patches/openblas-winexit.patch
105
+ echo 1 > $@
106
+
107
+ $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /build-configured : $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /openblas-skylakexdgemm.patch-applied $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /openblas-winexit.patch-applied
103
108
echo 1 > $@
104
109
105
110
$(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /build-compiled : $(BUILDDIR ) /$(OPENBLAS_SRC_DIR ) /build-configured
Original file line number Diff line number Diff line change
1
+ commit 67bdd1b07c8fe880b2813c96849444b3dea67860
2
+ Author: Keno Fischer <keno@juliacomputing.com>
3
+ Date: Sun Dec 29 15:08:13 2019 -0500
4
+
5
+ win32: Don't run cleanup if we're about to exit anyway
6
+
7
+ If the process is about to exit, there's no point trying to do
8
+ a bunch of work to clean up resources. The kernel will release
9
+ them much more efficiently when the process exits at the end
10
+ of this function.
11
+
12
+ diff --git a/exports/dllinit.c b/exports/dllinit.c
13
+ index 02ff092e..b65fe0c6 100644
14
+ --- a/exports/dllinit.c
15
+ +++ b/exports/dllinit.c
16
+ @@ -42,13 +42,17 @@ void gotoblas_init(void);
17
+ void gotoblas_quit(void);
18
+
19
+ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved) {
20
+ + <<<<<<< HEAD
21
+
22
+ if (reason == DLL_PROCESS_ATTACH) {
23
+ gotoblas_init();
24
+ }
25
+
26
+ if (reason == DLL_PROCESS_DETACH) {
27
+ - gotoblas_quit();
28
+ + // If the process is about to exit, don't bother releasing any resources
29
+ + // The kernel is much better at bulk releasing then.
30
+ + if (!reserved)
31
+ + gotoblas_quit();
32
+ }
33
+
34
+ return TRUE;
You can’t perform that action at this time.
0 commit comments