1/*	$NetBSD: mutexblock.c,v 1.6 2022/09/23 12:15:33 christos Exp $	*/
2
3/*
4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
5 *
6 * SPDX-License-Identifier: MPL-2.0
7 *
8 * This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
11 *
12 * See the COPYRIGHT file distributed with this work for additional
13 * information regarding copyright ownership.
14 */
15
16/*! \file */
17
18#include <isc/mutexblock.h>
19#include <isc/util.h>
20
21void
22isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
23	unsigned int i;
24
25	for (i = 0; i < count; i++) {
26		isc_mutex_init(&block[i]);
27	}
28}
29
30void
31isc_mutexblock_destroy(isc_mutex_t *block, unsigned int count) {
32	unsigned int i;
33
34	for (i = 0; i < count; i++) {
35		isc_mutex_destroy(&block[i]);
36	}
37}
38