Coverage Report

Created: 2026-08-31 07:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/bind9/lib/dns/lib.c
Line
Count
Source
1
/*
2
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3
 *
4
 * SPDX-License-Identifier: MPL-2.0
5
 *
6
 * This Source Code Form is subject to the terms of the Mozilla Public
7
 * License, v. 2.0. If a copy of the MPL was not distributed with this
8
 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
9
 *
10
 * See the COPYRIGHT file distributed with this work for additional
11
 * information regarding copyright ownership.
12
 */
13
14
/*! \file */
15
16
#include <isc/once.h>
17
#include <isc/refcount.h>
18
19
#include "acl_p.h"
20
#include "db_p.h"
21
#include "dlz_p.h"
22
#include "dst_internal.h"
23
#include "dyndb_p.h"
24
#include "qp_p.h"
25
#include "qpzone_p.h"
26
27
void
28
dns__zone_keymgmt_initialize(void);
29
void
30
dns__zone_keymgmt_shutdown(void);
31
32
/***
33
 *** Functions
34
 ***/
35
36
static isc_refcount_t dns__lib_references = 0;
37
38
void
39
dns__lib_initialize(void);
40
void
41
dns__lib_shutdown(void);
42
43
void
44
22
dns__lib_initialize(void) {
45
22
  if (isc_refcount_increment0(&dns__lib_references) > 0) {
46
0
    return;
47
0
  }
48
49
22
  dst__lib_initialize();
50
22
  dns__acl_initialize();
51
22
  dns__dlz_initialize();
52
22
  dns__db_initialize();
53
22
  dns__dyndb_initialize();
54
22
  dns__qp_initialize();
55
22
  dns__qpzone_initialize();
56
22
  dns__zone_keymgmt_initialize();
57
22
}
58
59
void
60
0
dns__lib_shutdown(void) {
61
0
  if (isc_refcount_decrement(&dns__lib_references) > 1) {
62
0
    return;
63
0
  }
64
65
0
  dns__zone_keymgmt_shutdown();
66
0
  dns__qpzone_shutdown();
67
0
  dns__qp_shutdown();
68
0
  dns__dyndb_shutdown();
69
0
  dns__db_shutdown();
70
0
  dns__dlz_shutdown();
71
0
  dns__acl_shutdown();
72
0
  dst__lib_shutdown();
73
0
}