From: Evan Hunt Date: Wed, 3 Oct 2018 23:11:10 +0000 (-0700) Subject: complete removal of a few unneeded functions X-Git-Tag: v9.13.4~114^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e86fa16e87144b3e9c56192114787483000729f;p=thirdparty%2Fbind9.git complete removal of a few unneeded functions - removed register functions from isc_app, isc_timer, isc_task - added a task_p.h header for use by unit tests --- diff --git a/lib/isc/include/isc/app.h b/lib/isc/include/isc/app.h index 9c15bd61b7a..75161b9fe39 100644 --- a/lib/isc/include/isc/app.h +++ b/lib/isc/include/isc/app.h @@ -333,29 +333,6 @@ isc_appctx_settimermgr(isc_appctx_t *ctx, isc_timermgr_t *timermgr); *\li 'timermgr' is a valid timer manager. */ -/*%< - * See isc_appctx_create() above. - */ -typedef isc_result_t -(*isc_appctxcreatefunc_t)(isc_mem_t *mctx, isc_appctx_t **ctxp); - -isc_result_t -isc_app_register(isc_appctxcreatefunc_t createfunc); -/*%< - * Register a new application implementation and add it to the list of - * supported implementations. This function must be called when a different - * event library is used than the one contained in the ISC library. - */ - -isc_result_t -isc__app_register(void); -/*%< - * A short cut function that specifies the application module in the ISC - * library for isc_app_register(). An application that uses the ISC library - * usually do not have to care about this function: it would call - * isc_lib_register(), which internally calls this function. - */ - ISC_LANG_ENDDECLS #endif /* ISC_APP_H */ diff --git a/lib/isc/include/isc/task.h b/lib/isc/include/isc/task.h index 3e14063fae4..c1bc09047ac 100644 --- a/lib/isc/include/isc/task.h +++ b/lib/isc/include/isc/task.h @@ -759,41 +759,6 @@ isc_result_t isc_taskmgr_renderjson(isc_taskmgr_t *mgr, json_object *tasksobj); #endif -/*%< - * See isc_taskmgr_create() above. - */ -typedef isc_result_t -(*isc_taskmgrcreatefunc_t)(isc_mem_t *mctx, unsigned int workers, - unsigned int default_quantum, - isc_taskmgr_t **managerp); - -isc_result_t -isc_task_register(isc_taskmgrcreatefunc_t createfunc); -/*%< - * Register a new task management implementation and add it to the list of - * supported implementations. This function must be called when a different - * event library is used than the one contained in the ISC library. - */ - -isc_result_t -isc__task_register(void); -/*%< - * A short cut function that specifies the task management module in the ISC - * library for isc_task_register(). An application that uses the ISC library - * usually do not have to care about this function: it would call - * isc_lib_register(), which internally calls this function. - */ - -/*%< - * These functions allow unit tests to manipulate the processing - * of the task queue. They are not intended as part of the public API. - */ -void -isc__taskmgr_pause(isc_taskmgr_t *taskmgr); - -void -isc__taskmgr_resume(isc_taskmgr_t *taskmgr); - ISC_LANG_ENDDECLS #endif /* ISC_TASK_H */ diff --git a/lib/isc/include/isc/timer.h b/lib/isc/include/isc/timer.h index cbc3153dd94..c8f31d9d142 100644 --- a/lib/isc/include/isc/timer.h +++ b/lib/isc/include/isc/timer.h @@ -373,29 +373,6 @@ isc_timermgr_destroy(isc_timermgr_t **managerp); void isc_timermgr_poke(isc_timermgr_t *m); -/*%< - * See isc_timermgr_create() above. - */ -typedef isc_result_t -(*isc_timermgrcreatefunc_t)(isc_mem_t *mctx, isc_timermgr_t **managerp); - -isc_result_t -isc__timer_register(void); -/*%< - * Register a new timer management implementation and add it to the list of - * supported implementations. This function must be called when a different - * event library is used than the one contained in the ISC library. - */ - -isc_result_t -isc_timer_register(isc_timermgrcreatefunc_t createfunc); -/*%< - * A short cut function that specifies the timer management module in the ISC - * library for isc_timer_register(). An application that uses the ISC library - * usually do not have to care about this function: it would call - * isc_lib_register(), which internally calls this function. - */ - ISC_LANG_ENDDECLS #endif /* ISC_TIMER_H */ diff --git a/lib/isc/task_p.h b/lib/isc/task_p.h new file mode 100644 index 00000000000..b3da61f4218 --- /dev/null +++ b/lib/isc/task_p.h @@ -0,0 +1,27 @@ +/* + * 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 http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +#ifndef ISC_TASK_P_H +#define ISC_TASK_P_H + +/*! \file */ + +/*% + * These functions allow unit tests to manipulate the processing + * of the task queue. They are not intended as part of the public API. + */ +void +isc__taskmgr_pause(isc_taskmgr_t *taskmgr); +void +isc__taskmgr_resume(isc_taskmgr_t *taskmgr); + + +#endif /* ISC_TASK_P_H */ diff --git a/lib/isc/tests/task_test.c b/lib/isc/tests/task_test.c index 58916e46218..2cb299d4de7 100644 --- a/lib/isc/tests/task_test.c +++ b/lib/isc/tests/task_test.c @@ -31,6 +31,8 @@ #include "isctest.h" +#include "../task_p.h" + /* * Helper functions */ diff --git a/lib/isc/win32/app.c b/lib/isc/win32/app.c index e2ad0b0eb5f..d43d457f17a 100644 --- a/lib/isc/win32/app.c +++ b/lib/isc/win32/app.c @@ -422,9 +422,4 @@ isc_appctx_settimermgr(isc_appctx_t *ctx0, isc_timermgr_t *timermgr) { ctx->timermgr = timermgr; } -isc_result_t -isc_app_register(void) { - return (isc_app_register(isc__appctx_create)); -} - #include "../app_api.c" diff --git a/util/copyrights b/util/copyrights index 9256bd84834..ae0fad1f7af 100644 --- a/util/copyrights +++ b/util/copyrights @@ -3489,6 +3489,7 @@ ./lib/isc/string.c C 1999,2000,2001,2003,2004,2005,2006,2007,2011,2012,2014,2015,2016,2018 ./lib/isc/symtab.c C 1996,1997,1998,1999,2000,2001,2004,2005,2007,2011,2012,2013,2016,2018 ./lib/isc/task.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 +./lib/isc/task_p.h C 2018 ./lib/isc/taskpool.c C 1999,2000,2001,2004,2005,2007,2011,2012,2013,2016,2018 ./lib/isc/tests/Atffile X 2011,2017,2018 ./lib/isc/tests/Kyuafile X 2017,2018