2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Update isc_timer to use isc_loopmgr

* isc_timer was rewritten using the uv_timer, and isc_timermgr_t was
  completely removed; isc_timer objects are now directly created on the
  isc_loop event loops.

* the isc_timer API has been simplified. the "inactive" timer type has
  been removed; timers are now stopped by calling isc_timer_stop()
  instead of resetting to inactive.

* isc_manager now creates a loop manager rather than a timer manager.

* modules and applications using isc_timer have been updated to use the
  new API.
This commit is contained in:
Ondřej Surý
2022-07-26 13:03:40 +02:00
parent 84c90e223f
commit 49b149f5fd
48 changed files with 953 additions and 1930 deletions

View File

@@ -34,7 +34,6 @@
#include <isc/string.h>
#include <isc/task.h>
#include <isc/thread.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <dns/adb.h>
@@ -2407,7 +2406,7 @@ clientmgr_destroy(ns_clientmgr_t *manager) {
isc_result_t
ns_clientmgr_create(ns_server_t *sctx, isc_taskmgr_t *taskmgr,
isc_timermgr_t *timermgr, dns_aclenv_t *aclenv, int tid,
isc_loopmgr_t *loopmgr, dns_aclenv_t *aclenv, int tid,
ns_clientmgr_t **managerp) {
ns_clientmgr_t *manager = NULL;
isc_mem_t *mctx = NULL;
@@ -2422,7 +2421,7 @@ ns_clientmgr_create(ns_server_t *sctx, isc_taskmgr_t *taskmgr,
isc_mutex_init(&manager->reclock);
manager->taskmgr = taskmgr;
manager->timermgr = timermgr;
manager->loopmgr = loopmgr;
manager->tid = tid;
dns_aclenv_attach(aclenv, &manager->aclenv);