From: Mark Andrews Date: Wed, 22 Dec 2010 05:19:02 +0000 (+0000) Subject: 2998. [func] Add isc_task_beginexclusive and isc_task_endexclusive X-Git-Tag: v9.8.1~96 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7a54dadeb565d746ef8b3fc77dc76455d836dd30;p=thirdparty%2Fbind9.git 2998. [func] Add isc_task_beginexclusive and isc_task_endexclusive to the task api. [RT #22776] --- diff --git a/CHANGES b/CHANGES index 6b2c2fac136..e53bdc4f59c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2998. [func] Add isc_task_beginexclusive and isc_task_endexclusive + to the task api. [RT #22776] + 2997. [func] named -V now reports the OpenSSL and libxml2 verions it was compiled against. [RT #22687] diff --git a/lib/isc/task.c b/lib/isc/task.c index 49dca3625be..6e0c7001d45 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: task.c,v 1.114 2010/12/04 13:25:59 marka Exp $ */ +/* $Id: task.c,v 1.115 2010/12/22 05:19:01 marka Exp $ */ /*! \file * \author Principal Author: Bob Halley @@ -233,9 +233,7 @@ static struct isc__taskmethods { * The following are defined just for avoiding unused static functions. */ #ifndef BIND9 - void *purgeevent, *unsendrange, - *getname, *gettag, *getcurrenttime, *beginexclusive, - *endexclusive; + void *purgeevent, *unsendrange, *getname, *gettag, *getcurrenttime; #endif } taskmethods = { { @@ -249,14 +247,15 @@ static struct isc__taskmethods { isc__task_shutdown, isc__task_setname, isc__task_purge, - isc__task_purgerange + isc__task_purgerange, + isc__task_beginexclusive, + isc__task_endexclusive } #ifndef BIND9 , (void *)isc__task_purgeevent, (void *)isc__task_unsendrange, (void *)isc__task_getname, (void *)isc__task_gettag, - (void *)isc__task_getcurrenttime, (void *)isc__task_beginexclusive, - (void *)isc__task_endexclusive + (void *)isc__task_getcurrenttime #endif }; diff --git a/lib/isc/task_api.c b/lib/isc/task_api.c index 89065355faa..8bd033437da 100644 --- a/lib/isc/task_api.c +++ b/lib/isc/task_api.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: task_api.c,v 1.5 2009/09/02 23:48:02 tbox Exp $ */ +/* $Id: task_api.c,v 1.6 2010/12/22 05:19:02 marka Exp $ */ #include @@ -187,6 +187,21 @@ isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type, void *tag) return (task->methods->purgeevents(task, sender, type, tag)); } +isc_result_t +isc_task_beginexclusive(isc_task_t *task) { + REQUIRE(ISCAPI_TASK_VALID(task)); + + return (task->methods->beginexclusive(task)); +} + +void +isc_task_endexclusive(isc_task_t *task) { + REQUIRE(ISCAPI_TASK_VALID(task)); + + task->methods->endexclusive(task); +} + + /*% * This is necessary for libisc's internal timer implementation. Other * implementation might skip implementing this.