PATH: //usr/include/bind9/isc
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 aes.h
↓
X
📄 align.h
↓
X
📄 app.h
↓
X
📄 assertions.h
↓
X
📄 astack.h
↓
X
📄 atomic.h
↓
X
📄 backtrace.h
↓
X
📄 barrier.h
↓
X
📄 base32.h
↓
X
📄 base64.h
↓
X
📄 bind9.h
↓
X
📄 buffer.h
↓
X
📄 bufferlist.h
↓
X
📄 cmocka.h
↓
X
📄 commandline.h
↓
X
📄 condition.h
↓
X
📄 counter.h
↓
X
📄 crc64.h
↓
X
📄 deprecated.h
↓
X
📄 dir.h
↓
X
📄 endian.h
↓
X
📄 errno.h
↓
X
📄 errno2result.h
↓
X
📄 error.h
↓
X
📄 event.h
↓
X
📄 eventclass.h
↓
X
📄 file.h
↓
X
📄 formatcheck.h
↓
X
📄 fsaccess.h
↓
X
📄 fuzz.h
↓
X
📄 hash.h
↓
X
📄 heap.h
↓
X
📄 hex.h
↓
X
📄 hmac.h
↓
X
📄 hp.h
↓
X
📄 ht.h
↓
X
📄 httpd.h
↓
X
📄 interfaceiter.h
↓
X
📄 iterated_hash.h
↓
X
📄 lang.h
↓
X
📄 lex.h
↓
X
📄 lfsr.h
↓
X
📄 lib.h
↓
X
📄 likely.h
↓
X
📄 list.h
↓
X
📄 log.h
↓
X
📄 magic.h
↓
X
📄 managers.h
↓
X
📄 md.h
↓
X
📄 mem.h
↓
X
📄 meminfo.h
↓
X
📄 mutex.h
↓
X
📄 mutexatomic.h
↓
X
📄 mutexblock.h
↓
X
📄 net.h
↓
X
📄 netaddr.h
↓
X
📄 netdb.h
↓
X
📄 netmgr.h
↓
X
📄 netscope.h
↓
X
📄 nonce.h
↓
X
📄 offset.h
↓
X
📄 once.h
↓
X
📄 os.h
↓
X
📄 parseint.h
↓
X
📄 platform.h
↓
X
📄 pool.h
↓
X
📄 portset.h
↓
X
📄 print.h
↓
X
📄 queue.h
↓
X
📄 quota.h
↓
X
📄 radix.h
↓
X
📄 random.h
↓
X
📄 ratelimiter.h
↓
X
📄 refcount.h
↓
X
📄 regex.h
↓
X
📄 region.h
↓
X
📄 resource.h
↓
X
📄 result.h
↓
X
📄 resultclass.h
↓
X
📄 rwlock.h
↓
X
📄 safe.h
↓
X
📄 serial.h
↓
X
📄 siphash.h
↓
X
📄 sockaddr.h
↓
X
📄 socket.h
↓
X
📄 stat.h
↓
X
📄 stats.h
↓
X
📄 stdatomic.h
↓
X
📄 stdio.h
↓
X
📄 stdtime.h
↓
X
📄 strerr.h
↓
X
📄 string.h
↓
X
📄 symtab.h
↓
X
📄 syslog.h
↓
X
📄 task.h
↓
X
📄 taskpool.h
↓
X
📄 thread.h
↓
X
📄 time.h
↓
X
📄 timer.h
↓
X
📄 tm.h
↓
X
📄 types.h
↓
X
📄 url.h
↓
X
📄 utf8.h
↓
X
📄 util.h
↓
X
📄 version.h
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: hp.h
/* * 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 <COPYRIGHT HOLDER> * 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 <isc/atomic.h> #include <isc/mem.h> #include <isc/string.h> #include <isc/types.h> #include <isc/util.h> /*% * 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) */
SIMPAN PERUBAHAN