[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
include
/
bind9
/
isc
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 aes.h
1,080 B
SET
[ EDIT ]
|
[ DEL ]
📄 app.h
10,478 B
SET
[ EDIT ]
|
[ DEL ]
📄 assertions.h
2,907 B
SET
[ EDIT ]
|
[ DEL ]
📄 atomic.h
4,168 B
SET
[ EDIT ]
|
[ DEL ]
📄 backtrace.h
3,891 B
SET
[ EDIT ]
|
[ DEL ]
📄 base32.h
4,453 B
SET
[ EDIT ]
|
[ DEL ]
📄 base64.h
2,866 B
SET
[ EDIT ]
|
[ DEL ]
📄 bind9.h
830 B
SET
[ EDIT ]
|
[ DEL ]
📄 boolean.h
594 B
SET
[ EDIT ]
|
[ DEL ]
📄 buffer.h
26,268 B
SET
[ EDIT ]
|
[ DEL ]
📄 bufferlist.h
1,452 B
SET
[ EDIT ]
|
[ DEL ]
📄 cmocka.h
1,383 B
SET
[ EDIT ]
|
[ DEL ]
📄 commandline.h
1,713 B
SET
[ EDIT ]
|
[ DEL ]
📄 condition.h
1,478 B
SET
[ EDIT ]
|
[ DEL ]
📄 counter.h
1,926 B
SET
[ EDIT ]
|
[ DEL ]
📄 crc64.h
998 B
SET
[ EDIT ]
|
[ DEL ]
📄 deprecated.h
623 B
SET
[ EDIT ]
|
[ DEL ]
📄 dir.h
1,598 B
SET
[ EDIT ]
|
[ DEL ]
📄 endian.h
4,778 B
SET
[ EDIT ]
|
[ DEL ]
📄 entropy.h
10,373 B
SET
[ EDIT ]
|
[ DEL ]
📄 errno.h
659 B
SET
[ EDIT ]
|
[ DEL ]
📄 errno2result.h
902 B
SET
[ EDIT ]
|
[ DEL ]
📄 error.h
1,430 B
SET
[ EDIT ]
|
[ DEL ]
📄 event.h
3,053 B
SET
[ EDIT ]
|
[ DEL ]
📄 eventclass.h
1,381 B
SET
[ EDIT ]
|
[ DEL ]
📄 file.h
11,667 B
SET
[ EDIT ]
|
[ DEL ]
📄 formatcheck.h
893 B
SET
[ EDIT ]
|
[ DEL ]
📄 fsaccess.h
7,442 B
SET
[ EDIT ]
|
[ DEL ]
📄 hash.h
7,662 B
SET
[ EDIT ]
|
[ DEL ]
📄 heap.h
5,264 B
SET
[ EDIT ]
|
[ DEL ]
📄 hex.h
2,806 B
SET
[ EDIT ]
|
[ DEL ]
📄 hmacmd5.h
1,787 B
SET
[ EDIT ]
|
[ DEL ]
📄 hmacsha.h
4,511 B
SET
[ EDIT ]
|
[ DEL ]
📄 ht.h
4,396 B
SET
[ EDIT ]
|
[ DEL ]
📄 httpd.h
2,318 B
SET
[ EDIT ]
|
[ DEL ]
📄 int.h
1,088 B
SET
[ EDIT ]
|
[ DEL ]
📄 interfaceiter.h
3,120 B
SET
[ EDIT ]
|
[ DEL ]
📄 iterated_hash.h
1,046 B
SET
[ EDIT ]
|
[ DEL ]
📄 json.h
1,459 B
SET
[ EDIT ]
|
[ DEL ]
📄 keyboard.h
989 B
SET
[ EDIT ]
|
[ DEL ]
📄 lang.h
637 B
SET
[ EDIT ]
|
[ DEL ]
📄 lex.h
9,771 B
SET
[ EDIT ]
|
[ DEL ]
📄 lfsr.h
2,958 B
SET
[ EDIT ]
|
[ DEL ]
📄 lib.h
1,068 B
SET
[ EDIT ]
|
[ DEL ]
📄 likely.h
818 B
SET
[ EDIT ]
|
[ DEL ]
📄 list.h
5,751 B
SET
[ EDIT ]
|
[ DEL ]
📄 log.h
28,734 B
SET
[ EDIT ]
|
[ DEL ]
📄 magic.h
994 B
SET
[ EDIT ]
|
[ DEL ]
📄 md5.h
2,380 B
SET
[ EDIT ]
|
[ DEL ]
📄 mem.h
21,110 B
SET
[ EDIT ]
|
[ DEL ]
📄 meminfo.h
710 B
SET
[ EDIT ]
|
[ DEL ]
📄 msgcat.h
2,726 B
SET
[ EDIT ]
|
[ DEL ]
📄 msgs.h
8,422 B
SET
[ EDIT ]
|
[ DEL ]
📄 mutex.h
3,524 B
SET
[ EDIT ]
|
[ DEL ]
📄 mutexblock.h
1,375 B
SET
[ EDIT ]
|
[ DEL ]
📄 net.h
10,534 B
SET
[ EDIT ]
|
[ DEL ]
📄 netaddr.h
4,590 B
SET
[ EDIT ]
|
[ DEL ]
📄 netdb.h
863 B
SET
[ EDIT ]
|
[ DEL ]
📄 netscope.h
967 B
SET
[ EDIT ]
|
[ DEL ]
📄 offset.h
700 B
SET
[ EDIT ]
|
[ DEL ]
📄 once.h
983 B
SET
[ EDIT ]
|
[ DEL ]
📄 ondestroy.h
2,799 B
SET
[ EDIT ]
|
[ DEL ]
📄 os.h
671 B
SET
[ EDIT ]
|
[ DEL ]
📄 parseint.h
1,542 B
SET
[ EDIT ]
|
[ DEL ]
📄 platform.h
9,717 B
SET
[ EDIT ]
|
[ DEL ]
📄 pool.h
3,502 B
SET
[ EDIT ]
|
[ DEL ]
📄 portset.h
3,295 B
SET
[ EDIT ]
|
[ DEL ]
📄 print.h
2,475 B
SET
[ EDIT ]
|
[ DEL ]
📄 queue.h
5,204 B
SET
[ EDIT ]
|
[ DEL ]
📄 quota.h
2,440 B
SET
[ EDIT ]
|
[ DEL ]
📄 radix.h
6,491 B
SET
[ EDIT ]
|
[ DEL ]
📄 random.h
3,582 B
SET
[ EDIT ]
|
[ DEL ]
📄 ratelimiter.h
3,497 B
SET
[ EDIT ]
|
[ DEL ]
📄 refcount.h
8,193 B
SET
[ EDIT ]
|
[ DEL ]
📄 regex.h
767 B
SET
[ EDIT ]
|
[ DEL ]
📄 region.h
2,034 B
SET
[ EDIT ]
|
[ DEL ]
📄 resource.h
2,862 B
SET
[ EDIT ]
|
[ DEL ]
📄 result.h
4,982 B
SET
[ EDIT ]
|
[ DEL ]
📄 resultclass.h
1,599 B
SET
[ EDIT ]
|
[ DEL ]
📄 rwlock.h
3,807 B
SET
[ EDIT ]
|
[ DEL ]
📄 safe.h
1,352 B
SET
[ EDIT ]
|
[ DEL ]
📄 serial.h
1,368 B
SET
[ EDIT ]
|
[ DEL ]
📄 sha1.h
1,556 B
SET
[ EDIT ]
|
[ DEL ]
📄 sha2.h
5,733 B
SET
[ EDIT ]
|
[ DEL ]
📄 siphash.h
734 B
SET
[ EDIT ]
|
[ DEL ]
📄 sockaddr.h
6,039 B
SET
[ EDIT ]
|
[ DEL ]
📄 socket.h
36,655 B
SET
[ EDIT ]
|
[ DEL ]
📄 stat.h
806 B
SET
[ EDIT ]
|
[ DEL ]
📄 stats.h
3,709 B
SET
[ EDIT ]
|
[ DEL ]
📄 stdatomic.h
5,250 B
SET
[ EDIT ]
|
[ DEL ]
📄 stdio.h
1,787 B
SET
[ EDIT ]
|
[ DEL ]
📄 stdlib.h
704 B
SET
[ EDIT ]
|
[ DEL ]
📄 stdtime.h
1,065 B
SET
[ EDIT ]
|
[ DEL ]
📄 strerror.h
777 B
SET
[ EDIT ]
|
[ DEL ]
📄 string.h
6,019 B
SET
[ EDIT ]
|
[ DEL ]
📄 symtab.h
4,326 B
SET
[ EDIT ]
|
[ DEL ]
📄 syslog.h
844 B
SET
[ EDIT ]
|
[ DEL ]
📄 task.h
21,544 B
SET
[ EDIT ]
|
[ DEL ]
📄 taskpool.h
3,709 B
SET
[ EDIT ]
|
[ DEL ]
📄 thread.h
1,506 B
SET
[ EDIT ]
|
[ DEL ]
📄 time.h
8,876 B
SET
[ EDIT ]
|
[ DEL ]
📄 timer.h
10,795 B
SET
[ EDIT ]
|
[ DEL ]
📄 tm.h
895 B
SET
[ EDIT ]
|
[ DEL ]
📄 types.h
5,780 B
SET
[ EDIT ]
|
[ DEL ]
📄 utf8.h
928 B
SET
[ EDIT ]
|
[ DEL ]
📄 util.h
10,537 B
SET
[ EDIT ]
|
[ DEL ]
📄 version.h
689 B
SET
[ EDIT ]
|
[ DEL ]
📄 xml.h
1,094 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: refcount.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. */ #ifndef ISC_REFCOUNT_H #define ISC_REFCOUNT_H 1 #include <inttypes.h> #include <isc/assertions.h> #include <isc/atomic.h> #include <isc/error.h> #include <isc/lang.h> #include <isc/mutex.h> #include <isc/platform.h> #include <isc/types.h> #if defined(ISC_PLATFORM_HAVESTDATOMIC) #if defined (__cplusplus) #include <isc/stdatomic.h> #else #include <stdatomic.h> #endif #endif /*! \file isc/refcount.h * \brief Implements a locked reference counter. * * These functions may actually be * implemented using macros, and implementations of these macros are below. * The isc_refcount_t type should not be accessed directly, as its contents * depend on the implementation. */ ISC_LANG_BEGINDECLS /* * Function prototypes */ /* * isc_result_t * isc_refcount_init(isc_refcount_t *ref, unsigned int n); * * Initialize the reference counter. There will be 'n' initial references. * * Requires: * ref != NULL */ /* * void * isc_refcount_destroy(isc_refcount_t *ref); * * Destroys a reference counter. * * Requires: * ref != NULL * The number of references is 0. */ /* * void * isc_refcount_increment(isc_refcount_t *ref, unsigned int *targetp); * isc_refcount_increment0(isc_refcount_t *ref, unsigned int *targetp); * * Increments the reference count, returning the new value in targetp if it's * not NULL. The reference counter typically begins with the initial counter * of 1, and will be destroyed once the counter reaches 0. Thus, * isc_refcount_increment() additionally requires the previous counter be * larger than 0 so that an error which violates the usage can be easily * caught. isc_refcount_increment0() does not have this restriction. * * Requires: * ref != NULL. */ /* * void * isc_refcount_decrement(isc_refcount_t *ref, unsigned int *targetp); * * Decrements the reference count, returning the new value in targetp if it's * not NULL. * * Requires: * ref != NULL. */ /* * Sample implementations */ #ifdef ISC_PLATFORM_USETHREADS #if defined(ISC_PLATFORM_HAVESTDATOMIC) # define ISC_REFCOUNT_HAVEATOMIC 1 # define ISC_REFCOUNT_HAVESTDATOMIC 1 #else /* defined(ISC_PLATFORM_HAVESTDATOMIC) */ # if defined(ISC_PLATFORM_HAVEXADD) # define ISC_REFCOUNT_HAVEATOMIC 1 # endif /* defined(ISC_PLATFORM_HAVEXADD */ #endif /* !defined(ISC_REFCOUNT_HAVEATOMIC) */ #if defined(ISC_REFCOUNT_HAVEATOMIC) typedef struct isc_refcount { #if defined(ISC_REFCOUNT_HAVESTDATOMIC) atomic_int_fast32_t refs; #else int32_t refs; #endif } isc_refcount_t; #if defined(ISC_REFCOUNT_HAVESTDATOMIC) #define isc_refcount_current(rp) \ ((unsigned int)(atomic_load_explicit(&(rp)->refs, \ memory_order_acquire))) #define isc_refcount_destroy(rp) ISC_REQUIRE(isc_refcount_current(rp) == 0) #define isc_refcount_increment0(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int32_t prev; \ prev = atomic_fetch_add_explicit \ (&(rp)->refs, 1, memory_order_relaxed); \ if (_tmp != NULL) \ *_tmp = prev + 1; \ } while (0) #define isc_refcount_increment(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int32_t prev; \ prev = atomic_fetch_add_explicit \ (&(rp)->refs, 1, memory_order_relaxed); \ ISC_REQUIRE(prev > 0); \ if (_tmp != NULL) \ *_tmp = prev + 1; \ } while (0) #define isc_refcount_decrement(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int32_t prev; \ prev = atomic_fetch_sub_explicit \ (&(rp)->refs, 1, memory_order_acq_rel); \ ISC_REQUIRE(prev > 0); \ if (_tmp != NULL) \ *_tmp = prev - 1; \ } while (0) #else /* defined(ISC_REFCOUNT_HAVESTDATOMIC) */ #define isc_refcount_current(rp) \ ((unsigned int)(isc_atomic_xadd(&(rp)->refs, 0))) #define isc_refcount_destroy(rp) ISC_REQUIRE(isc_refcount_current(rp) == 0) #define isc_refcount_increment0(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int32_t prev; \ prev = isc_atomic_xadd(&(rp)->refs, 1); \ if (_tmp != NULL) \ *_tmp = prev + 1; \ } while (0) #define isc_refcount_increment(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int32_t prev; \ prev = isc_atomic_xadd(&(rp)->refs, 1); \ ISC_REQUIRE(prev > 0); \ if (_tmp != NULL) \ *_tmp = prev + 1; \ } while (0) #define isc_refcount_decrement(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int32_t prev; \ prev = isc_atomic_xadd(&(rp)->refs, -1); \ ISC_REQUIRE(prev > 0); \ if (_tmp != NULL) \ *_tmp = prev - 1; \ } while (0) #endif /* defined(ISC_REFCOUNT_HAVESTDATOMIC) */ #else /* defined(ISC_REFCOUNT_HAVEATOMIC) */ typedef struct isc_refcount { int refs; isc_mutex_t lock; } isc_refcount_t; /*% Destroys a reference counter. */ #define isc_refcount_destroy(rp) \ do { \ isc_result_t _result; \ ISC_REQUIRE((rp)->refs == 0); \ _result = isc_mutex_destroy(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ } while (0) unsigned int isc_refcount_current(isc_refcount_t *rp); /*% * Increments the reference count, returning the new value in * 'tp' if it's not NULL. */ #define isc_refcount_increment0(rp, tp) \ do { \ isc_result_t _result; \ unsigned int *_tmp = (unsigned int *)(tp); \ _result = isc_mutex_lock(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ ++((rp)->refs); \ if (_tmp != NULL) \ *_tmp = ((rp)->refs); \ _result = isc_mutex_unlock(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ } while (0) #define isc_refcount_increment(rp, tp) \ do { \ isc_result_t _result; \ unsigned int *_tmp = (unsigned int *)(tp); \ _result = isc_mutex_lock(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ ISC_REQUIRE((rp)->refs > 0); \ ++((rp)->refs); \ if (_tmp != NULL) \ *_tmp = ((rp)->refs); \ _result = isc_mutex_unlock(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ } while (0) /*% * Decrements the reference count, returning the new value in 'tp' * if it's not NULL. */ #define isc_refcount_decrement(rp, tp) \ do { \ isc_result_t _result; \ unsigned int *_tmp = (unsigned int *)(tp); \ _result = isc_mutex_lock(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ ISC_REQUIRE((rp)->refs > 0); \ --((rp)->refs); \ if (_tmp != NULL) \ *_tmp = ((rp)->refs); \ _result = isc_mutex_unlock(&(rp)->lock); \ ISC_ERROR_RUNTIMECHECK(_result == ISC_R_SUCCESS); \ } while (0) #endif /* defined(ISC_REFCOUNT_ATOMIC) */ #else /* ISC_PLATFORM_USETHREADS */ typedef struct isc_refcount { int refs; } isc_refcount_t; #define isc_refcount_destroy(rp) ISC_REQUIRE((rp)->refs == 0) #define isc_refcount_current(rp) ((unsigned int)((rp)->refs)) #define isc_refcount_increment0(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int _n = ++(rp)->refs; \ if (_tmp != NULL) \ *_tmp = _n; \ } while (0) #define isc_refcount_increment(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int _n; \ ISC_REQUIRE((rp)->refs > 0); \ _n = ++(rp)->refs; \ if (_tmp != NULL) \ *_tmp = _n; \ } while (0) #define isc_refcount_decrement(rp, tp) \ do { \ unsigned int *_tmp = (unsigned int *)(tp); \ int _n; \ ISC_REQUIRE((rp)->refs > 0); \ _n = --(rp)->refs; \ if (_tmp != NULL) \ *_tmp = _n; \ } while (0) #endif /* ISC_PLATFORM_USETHREADS */ isc_result_t isc_refcount_init(isc_refcount_t *ref, unsigned int n); ISC_LANG_ENDDECLS #endif /* ISC_REFCOUNT_H */