[ 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: queue.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. */ /* * This is a generic implementation of a two-lock concurrent queue. * There are built-in mutex locks for the head and tail of the queue, * allowing elements to be safely added and removed at the same time. * * NULL is "end of list" * -1 is "not linked" */ #ifndef ISC_QUEUE_H #define ISC_QUEUE_H 1 #include <stdbool.h> #include <isc/assertions.h> #include <isc/mutex.h> #ifdef ISC_QUEUE_CHECKINIT #define ISC_QLINK_INSIST(x) ISC_INSIST(x) #else #define ISC_QLINK_INSIST(x) (void)0 #endif #define ISC_QLINK(type) struct { type *prev, *next; } #define ISC_QLINK_INIT(elt, link) \ do { \ (elt)->link.next = (elt)->link.prev = (void *)(-1); \ } while(0) #define ISC_QLINK_LINKED(elt, link) ((void*)(elt)->link.next != (void*)(-1)) #define ISC_QUEUE(type) struct { \ type *head, *tail; \ isc_mutex_t headlock, taillock; \ } #define ISC_QUEUE_INIT(queue, link) \ do { \ (void) isc_mutex_init(&(queue).taillock); \ (void) isc_mutex_init(&(queue).headlock); \ (queue).tail = (queue).head = NULL; \ } while (0) #define ISC_QUEUE_EMPTY(queue) ((queue).head == NULL) #define ISC_QUEUE_DESTROY(queue) \ do { \ ISC_QLINK_INSIST(ISC_QUEUE_EMPTY(queue)); \ (void) isc_mutex_destroy(&(queue).taillock); \ (void) isc_mutex_destroy(&(queue).headlock); \ } while (0) /* * queues are meant to separate the locks at either end. For best effect, that * means keeping the ends separate - i.e. non-empty queues work best. * * a push to an empty queue has to take the pop lock to update * the pop side of the queue. * Popping the last entry has to take the push lock to update * the push side of the queue. * * The order is (pop, push), because a pop is presumably in the * latency path and a push is when we're done. * * We do an MT hot test in push to see if we need both locks, so we can * acquire them in order. Hopefully that makes the case where we get * the push lock and find we need the pop lock (and have to release it) rare. * * > 1 entry - no collision, push works on one end, pop on the other * 0 entry - headlock race * pop wins - return(NULL), push adds new as both head/tail * push wins - updates head/tail, becomes 1 entry case. * 1 entry - taillock race * pop wins - return(pop) sets head/tail NULL, becomes 0 entry case * push wins - updates {head,tail}->link.next, pop updates head * with new ->link.next and doesn't update tail * */ #define ISC_QUEUE_PUSH(queue, elt, link) \ do { \ bool headlocked = false; \ ISC_QLINK_INSIST(!ISC_QLINK_LINKED(elt, link)); \ LOCK(&(queue).taillock); \ if ((queue).tail == NULL) { \ UNLOCK(&(queue).taillock); \ LOCK(&(queue).headlock); \ LOCK(&(queue).taillock); \ headlocked = true; \ } \ (elt)->link.prev = (queue).tail; \ (elt)->link.next = NULL; \ if ((queue).tail != NULL) \ (queue).tail->link.next = (elt); \ (queue).tail = (elt); \ UNLOCK(&(queue).taillock); \ if (headlocked) { \ if ((queue).head == NULL) \ (queue).head = (elt); \ UNLOCK(&(queue).headlock); \ } \ } while (0) #define ISC_QUEUE_POP(queue, link, ret) \ do { \ LOCK(&(queue).headlock); \ ret = (queue).head; \ while (ret != NULL) { \ if (ret->link.next == NULL) { \ LOCK(&(queue).taillock); \ if (ret->link.next == NULL) { \ (queue).head = (queue).tail = NULL; \ UNLOCK(&(queue).taillock); \ break; \ }\ UNLOCK(&(queue).taillock); \ } \ (queue).head = ret->link.next; \ (queue).head->link.prev = NULL; \ break; \ } \ UNLOCK(&(queue).headlock); \ if (ret != NULL) \ (ret)->link.next = (ret)->link.prev = (void *)(-1); \ } while(0) #define ISC_QUEUE_UNLINK(queue, elt, link) \ do { \ ISC_QLINK_INSIST(ISC_QLINK_LINKED(elt, link)); \ LOCK(&(queue).headlock); \ LOCK(&(queue).taillock); \ if ((elt)->link.prev == NULL) \ (queue).head = (elt)->link.next; \ else \ (elt)->link.prev->link.next = (elt)->link.next; \ if ((elt)->link.next == NULL) \ (queue).tail = (elt)->link.prev; \ else \ (elt)->link.next->link.prev = (elt)->link.prev; \ UNLOCK(&(queue).taillock); \ UNLOCK(&(queue).headlock); \ (elt)->link.next = (elt)->link.prev = (void *)(-1); \ } while(0) #define ISC_QUEUE_UNLINKIFLINKED(queue, elt, link) \ do { \ LOCK(&(queue).headlock); \ LOCK(&(queue).taillock); \ if (ISC_QLINK_LINKED(elt, link)) { \ if ((elt)->link.prev == NULL) \ (queue).head = (elt)->link.next; \ else \ (elt)->link.prev->link.next = (elt)->link.next; \ if ((elt)->link.next == NULL) \ (queue).tail = (elt)->link.prev; \ else \ (elt)->link.next->link.prev = (elt)->link.prev; \ } \ UNLOCK(&(queue).taillock); \ UNLOCK(&(queue).headlock); \ (elt)->link.next = (elt)->link.prev = (void *)(-1); \ } while(0) #endif /* ISC_QUEUE_H */