/usr/include/bind9/isc
NameSizeModeActions
aes.h10150644editdlrm
align.h5690644editdlrm
app.h71390644editdlrm
assertions.h22270644editdlrm
astack.h11370644editdlrm
atomic.h30820644editdlrm
backtrace.h38940644editdlrm
barrier.h10520644editdlrm
base32.h44530644editdlrm
base64.h28650644editdlrm
bind9.h8290644editdlrm
buffer.h306250644editdlrm
bufferlist.h14530644editdlrm
cmocka.h13830644editdlrm
commandline.h17110644editdlrm
condition.h19140644editdlrm
counter.h19220644editdlrm
crc64.h9980644editdlrm
deprecated.h6620644editdlrm
dir.h15450644editdlrm
endian.h48680644editdlrm
errno.h6590644editdlrm
errno2result.h9010644editdlrm
error.h14340644editdlrm
event.h34420644editdlrm
eventclass.h14420644editdlrm
file.h116690644editdlrm
formatcheck.h9400644editdlrm
fsaccess.h74530644editdlrm
fuzz.h5930644editdlrm
hash.h16490644editdlrm
heap.h52630644editdlrm
hex.h28050644editdlrm
hmac.h39700644editdlrm
hp.h45880644editdlrm
ht.h44850644editdlrm
httpd.h22910644editdlrm
interfaceiter.h31410644editdlrm
iterated_hash.h9330644editdlrm
lang.h6860644editdlrm
lex.h100040644editdlrm
lfsr.h29550644editdlrm
lib.h11550644editdlrm
likely.h8680644editdlrm
list.h80850644editdlrm
log.h264970644editdlrm
magic.h9990644editdlrm
managers.h7760644editdlrm
md.h57600644editdlrm
mem.h180860644editdlrm
meminfo.h7100644editdlrm
mutex.h41780644editdlrm
mutexatomic.h97900644editdlrm
mutexblock.h11620644editdlrm
net.h85640644editdlrm
netaddr.h47860644editdlrm
netdb.h8600644editdlrm
netmgr.h157320644editdlrm
netscope.h9660644editdlrm
nonce.h7430644editdlrm
offset.h6870644editdlrm
once.h7670644editdlrm
os.h7650644editdlrm
parseint.h15410644editdlrm
platform.h18590644editdlrm
pool.h34910644editdlrm
portset.h32940644editdlrm
print.h6800644editdlrm
queue.h13370644editdlrm
quota.h35600644editdlrm
radix.h70190644editdlrm
random.h14820644editdlrm
ratelimiter.h34920644editdlrm
refcount.h51030644editdlrm
regex.h7670644editdlrm
region.h22340644editdlrm
resource.h28600644editdlrm
result.h55800644editdlrm
resultclass.h15970644editdlrm
rwlock.h25350644editdlrm
safe.h11450644editdlrm
serial.h13670644editdlrm
siphash.h9160644editdlrm
sockaddr.h62750644editdlrm
socket.h241200644editdlrm
stat.h8030644editdlrm
stats.h66890644editdlrm
stdatomic.h91160644editdlrm
stdio.h17280644editdlrm
stdtime.h13920644editdlrm
strerr.h5750644editdlrm
string.h8510644editdlrm
symtab.h43250644editdlrm
syslog.h8430644editdlrm
task.h171260644editdlrm
taskpool.h32810644editdlrm
thread.h19080644editdlrm
time.h111060644editdlrm
timer.h79610644editdlrm
tm.h8940644editdlrm
types.h58540644editdlrm
url.h26810644editdlrm
utf8.h9280644editdlrm
util.h142910644editdlrm
version.h4990644editdlrm
Edit: /usr/include/bind9/isc/hp.h (4588B)
/* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* * Hazard Pointer implementation. * * This work is based on C++ code available from: * https://github.com/pramalhe/ConcurrencyFreaks/ * * Copyright (c) 2014-2016, Pedro Ramalhete, Andreia Correia * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Concurrency Freaks nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #include #include #include #include #include /*% * Hazard pointers are a mechanism for protecting objects in memory * from being deleted by other threads while in use. This allows * safe lock-free data structures. * * This is an adaptation of the ConcurrencyFreaks implementation in C. * More details available at https://github.com/pramalhe/ConcurrencyFreaks, * in the file HazardPointers.hpp. */ typedef void(isc_hp_deletefunc_t)(void *); void isc_hp_init(int max_threads); /*%< * Initialize hazard pointer constants - isc__hp_max_threads. If more threads * will try to access hp it will assert. */ isc_hp_t * isc_hp_new(isc_mem_t *mctx, size_t max_hps, isc_hp_deletefunc_t *deletefunc); /*%< * Create a new hazard pointer array of size 'max_hps' (or a reasonable * default value if 'max_hps' is 0). The function 'deletefunc' will be * used to delete objects protected by hazard pointers when it becomes * safe to retire them. */ void isc_hp_destroy(isc_hp_t *hp); /*%< * Destroy a hazard pointer array and clean up all objects protected * by hazard pointers. */ void isc_hp_clear(isc_hp_t *hp); /*%< * Clear all hazard pointers in the array for the current thread. * * Progress condition: wait-free bounded (by max_hps) */ void isc_hp_clear_one(isc_hp_t *hp, int ihp); /*%< * Clear a specified hazard pointer in the array for the current thread. * * Progress condition: wait-free population oblivious. */ uintptr_t isc_hp_protect(isc_hp_t *hp, int ihp, atomic_uintptr_t *atom); /*%< * Protect an object referenced by 'atom' with a hazard pointer for the * current thread. * * Progress condition: lock-free. */ uintptr_t isc_hp_protect_ptr(isc_hp_t *hp, int ihp, atomic_uintptr_t ptr); /*%< * This returns the same value that is passed as ptr, which is sometimes * useful. * * Progress condition: wait-free population oblivious. */ uintptr_t isc_hp_protect_release(isc_hp_t *hp, int ihp, atomic_uintptr_t ptr); /*%< * Same as isc_hp_protect_ptr(), but explicitly uses memory_order_release. * * Progress condition: wait-free population oblivious. */ void isc_hp_retire(isc_hp_t *hp, uintptr_t ptr); /*%< * Retire an object that is no longer in use by any thread, calling * the delete function that was specified in isc_hp_new(). * * Progress condition: wait-free bounded (by the number of threads squared) */