"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.17.5/lib/isc/include/isc/mutexblock.h" (4 Sep 2020, 1161 Bytes) of package /linux/misc/dns/bind9/9.17.5/bind-9.17.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mutexblock.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 #ifndef ISC_MUTEXBLOCK_H
   13 #define ISC_MUTEXBLOCK_H 1
   14 
   15 /*! \file isc/mutexblock.h */
   16 
   17 #include <isc/lang.h>
   18 #include <isc/mutex.h>
   19 #include <isc/types.h>
   20 
   21 ISC_LANG_BEGINDECLS
   22 
   23 void
   24 isc_mutexblock_init(isc_mutex_t *block, unsigned int count);
   25 /*%<
   26  * Initialize a block of locks.  If an error occurs all initialized locks
   27  * will be destroyed, if possible.
   28  *
   29  * Requires:
   30  *
   31  *\li   block != NULL
   32  *
   33  *\li   count > 0
   34  *
   35  */
   36 
   37 void
   38 isc_mutexblock_destroy(isc_mutex_t *block, unsigned int count);
   39 /*%<
   40  * Destroy a block of locks.
   41  *
   42  * Requires:
   43  *
   44  *\li   block != NULL
   45  *
   46  *\li   count > 0
   47  *
   48  *\li   Each lock in the block be initialized via isc_mutex_init() or
   49  *  the whole block was initialized via isc_mutex_initblock().
   50  *
   51  */
   52 
   53 ISC_LANG_ENDDECLS
   54 
   55 #endif /* ISC_MUTEXBLOCK_H */