mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
Call isc__initialize()/isc__shutdown() from win32 DllMain
Call the libisc isc__initialize() constructor and isc__shutdown() destructor from DllMain instead of having duplicate code between those and DllMain() code.
This commit is contained in:
@@ -222,6 +222,7 @@ libisc_la_SOURCES = \
|
|||||||
pthreads/thread.c \
|
pthreads/thread.c \
|
||||||
entropy_private.h \
|
entropy_private.h \
|
||||||
fsaccess_common_p.h \
|
fsaccess_common_p.h \
|
||||||
|
lib_p.h \
|
||||||
mem_p.h \
|
mem_p.h \
|
||||||
task_p.h \
|
task_p.h \
|
||||||
tls_p.h
|
tls_p.h
|
||||||
|
18
lib/isc/lib_p.h
Normal file
18
lib/isc/lib_p.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
|
* information regarding copyright ownership.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
void
|
||||||
|
isc__initialize(void);
|
||||||
|
|
||||||
|
void
|
||||||
|
isc__shutdown(void);
|
@@ -16,9 +16,7 @@
|
|||||||
#include <isc/tls.h>
|
#include <isc/tls.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
#include "mem_p.h"
|
#include "lib_p.h"
|
||||||
#include "tls_p.h"
|
|
||||||
#include "trampoline_p.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called when we enter the DLL
|
* Called when we enter the DLL
|
||||||
@@ -31,9 +29,7 @@ __declspec(dllexport) BOOL WINAPI
|
|||||||
* LoadLibrary.
|
* LoadLibrary.
|
||||||
*/
|
*/
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
isc__mem_initialize();
|
isc__initialize();
|
||||||
isc__tls_initialize();
|
|
||||||
isc__trampoline_initialize();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -41,9 +37,7 @@ __declspec(dllexport) BOOL WINAPI
|
|||||||
* termination or a call to FreeLibrary.
|
* termination or a call to FreeLibrary.
|
||||||
*/
|
*/
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
isc__trampoline_shutdown();
|
isc__shutdown();
|
||||||
isc__tls_shutdown();
|
|
||||||
isc__mem_shutdown();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_THREAD_ATTACH:
|
case DLL_THREAD_ATTACH:
|
||||||
|
@@ -1900,6 +1900,7 @@
|
|||||||
./lib/isc/iterated_hash.c C 2006,2008,2009,2016,2018,2019,2020,2021
|
./lib/isc/iterated_hash.c C 2006,2008,2009,2016,2018,2019,2020,2021
|
||||||
./lib/isc/lex.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2013,2014,2015,2016,2017,2018,2019,2020,2021
|
./lib/isc/lex.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2013,2014,2015,2016,2017,2018,2019,2020,2021
|
||||||
./lib/isc/lib.c C 1999,2000,2001,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020,2021
|
./lib/isc/lib.c C 1999,2000,2001,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020,2021
|
||||||
|
./lib/isc/lib_p.h C 2021
|
||||||
./lib/isc/log.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2011,2012,2013,2014,2016,2017,2018,2019,2020,2021
|
./lib/isc/log.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2011,2012,2013,2014,2016,2017,2018,2019,2020,2021
|
||||||
./lib/isc/md.c C 2018,2019,2020,2021
|
./lib/isc/md.c C 2018,2019,2020,2021
|
||||||
./lib/isc/mem.c C 1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021
|
./lib/isc/mem.c C 1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021
|
||||||
|
Reference in New Issue
Block a user