]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2998. [func] Add isc_task_beginexclusive and isc_task_endexclusive
authorMark Andrews <marka@isc.org>
Wed, 22 Dec 2010 05:19:02 +0000 (05:19 +0000)
committerMark Andrews <marka@isc.org>
Wed, 22 Dec 2010 05:19:02 +0000 (05:19 +0000)
                        to the task api. [RT #22776]

CHANGES
lib/isc/task.c
lib/isc/task_api.c

diff --git a/CHANGES b/CHANGES
index 6b2c2fac136ebc8bde1486c78e55f88bc7a336b5..e53bdc4f59c450b905310e4e24d4ffd9afef91a9 100644 (file)
--- 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]
 
index 49dca3625be9131dd46e6a4153e74c6500aec255..6e0c7001d452cb48957835f9f63f50a95b7a32ac 100644 (file)
@@ -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
 };
 
index 89065355faa61f028609d0a176f13b5dcd9f60d0..8bd033437da0950d382a7572c7ba6b1e3fbb6ac5 100644 (file)
@@ -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 <config.h>
 
@@ -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.