Coverage Report

Created: 2026-02-26 06:45

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
/***
28
 *** Functions
29
 ***/
30
31
static isc_refcount_t dns__lib_references = 0;
32
33
void
34
dns__lib_initialize(void);
35
void
36
dns__lib_shutdown(void);
37
38
void
39
2
dns__lib_initialize(void) {
40
2
  if (isc_refcount_increment0(&dns__lib_references) > 0) {
41
0
    return;
42
0
  }
43
44
2
  dst__lib_initialize();
45
2
  dns__acl_initialize();
46
2
  dns__dlz_initialize();
47
2
  dns__db_initialize();
48
2
  dns__dyndb_initialize();
49
2
  dns__qp_initialize();
50
2
  dns__qpzone_initialize();
51
2
}
52
53
void
54
0
dns__lib_shutdown(void) {
55
0
  if (isc_refcount_decrement(&dns__lib_references) > 1) {
56
0
    return;
57
0
  }
58
59
0
  dns__qpzone_shutdown();
60
0
  dns__qp_shutdown();
61
0
  dns__dyndb_shutdown();
62
0
  dns__db_shutdown();
63
0
  dns__dlz_shutdown();
64
0
  dns__acl_shutdown();
65
0
  dst__lib_shutdown();
66
0
}