summaryrefslogtreecommitdiffstats
path: root/lib/isc/include
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:41:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:41:28 +0000
commit14509ce60103dab695cef4d4f31321bab27ab967 (patch)
tree5959cfb9832b3af242a1ca45d4a1227acae67d87 /lib/isc/include
parentAdding debian version 1:9.18.19-1~deb12u1. (diff)
downloadbind9-14509ce60103dab695cef4d4f31321bab27ab967.tar.xz
bind9-14509ce60103dab695cef4d4f31321bab27ab967.zip
Merging upstream version 1:9.18.24.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/isc/include')
-rw-r--r--lib/isc/include/isc/endian.h34
-rw-r--r--lib/isc/include/isc/net.h4
-rw-r--r--lib/isc/include/isc/netmgr.h3
-rw-r--r--lib/isc/include/isc/radix.h2
-rw-r--r--lib/isc/include/isc/types.h10
5 files changed, 29 insertions, 24 deletions
diff --git a/lib/isc/include/isc/endian.h b/lib/isc/include/isc/endian.h
index be91b1d..2590415 100644
--- a/lib/isc/include/isc/endian.h
+++ b/lib/isc/include/isc/endian.h
@@ -86,29 +86,29 @@
#include <inttypes.h>
#ifndef bswap_16
-#define bswap_16(x) \
- ((uint16_t)((((uint16_t)(x)&0xff00) >> 8) | \
- (((uint16_t)(x)&0x00ff) << 8)))
+#define bswap_16(x) \
+ ((uint16_t)((((uint16_t)(x) & 0xff00) >> 8) | \
+ (((uint16_t)(x) & 0x00ff) << 8)))
#endif /* !bswap_16 */
#ifndef bswap_32
-#define bswap_32(x) \
- ((uint32_t)((((uint32_t)(x)&0xff000000) >> 24) | \
- (((uint32_t)(x)&0x00ff0000) >> 8) | \
- (((uint32_t)(x)&0x0000ff00) << 8) | \
- (((uint32_t)(x)&0x000000ff) << 24)))
+#define bswap_32(x) \
+ ((uint32_t)((((uint32_t)(x) & 0xff000000) >> 24) | \
+ (((uint32_t)(x) & 0x00ff0000) >> 8) | \
+ (((uint32_t)(x) & 0x0000ff00) << 8) | \
+ (((uint32_t)(x) & 0x000000ff) << 24)))
#endif /* !bswap_32 */
#ifndef bswap_64
-#define bswap_64(x) \
- ((uint64_t)((((uint64_t)(x)&0xff00000000000000ULL) >> 56) | \
- (((uint64_t)(x)&0x00ff000000000000ULL) >> 40) | \
- (((uint64_t)(x)&0x0000ff0000000000ULL) >> 24) | \
- (((uint64_t)(x)&0x000000ff00000000ULL) >> 8) | \
- (((uint64_t)(x)&0x00000000ff000000ULL) << 8) | \
- (((uint64_t)(x)&0x0000000000ff0000ULL) << 24) | \
- (((uint64_t)(x)&0x000000000000ff00ULL) << 40) | \
- (((uint64_t)(x)&0x00000000000000ffULL) << 56)))
+#define bswap_64(x) \
+ ((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
+ (((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
+ (((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
+ (((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \
+ (((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \
+ (((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
+ (((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
+ (((uint64_t)(x) & 0x00000000000000ffULL) << 56)))
#endif /* !bswap_64 */
#ifndef htobe16
diff --git a/lib/isc/include/isc/net.h b/lib/isc/include/isc/net.h
index 1a3ce63..077f66e 100644
--- a/lib/isc/include/isc/net.h
+++ b/lib/isc/include/isc/net.h
@@ -192,10 +192,10 @@
/*% Is IP address multicast? */
#define ISC_IPADDR_ISMULTICAST(i) \
- (((uint32_t)(i)&ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xe0000000))
+ (((uint32_t)(i) & ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xe0000000))
#define ISC_IPADDR_ISEXPERIMENTAL(i) \
- (((uint32_t)(i)&ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xf0000000))
+ (((uint32_t)(i) & ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xf0000000))
/***
*** Functions.
diff --git a/lib/isc/include/isc/netmgr.h b/lib/isc/include/isc/netmgr.h
index eff33f6..d42cfe9 100644
--- a/lib/isc/include/isc/netmgr.h
+++ b/lib/isc/include/isc/netmgr.h
@@ -750,6 +750,9 @@ isc_nm_verify_tls_peer_result_string(const isc_nmhandle_t *handle);
* \li 'handle' is a valid netmgr handle object.
*/
+#define ISC_NM_TASK_SLOW_OFFSET -2
+#define ISC_NM_TASK_SLOW(i) (ISC_NM_TASK_SLOW_OFFSET - 1 - i)
+
void
isc_nm_task_enqueue(isc_nm_t *mgr, isc_task_t *task, int threadid);
/*%<
diff --git a/lib/isc/include/isc/radix.h b/lib/isc/include/isc/radix.h
index 9a91118..b385e12 100644
--- a/lib/isc/include/isc/radix.h
+++ b/lib/isc/include/isc/radix.h
@@ -192,7 +192,7 @@ isc_radix_process(isc_radix_tree_t *radix, isc_radix_processfunc_t func);
*/
#define RADIX_MAXBITS 128
-#define RADIX_NBIT(x) (0x80 >> ((x)&0x7f))
+#define RADIX_NBIT(x) (0x80 >> ((x) & 0x7f))
#define RADIX_NBYTE(x) ((x) >> 3)
#define RADIX_WALK(Xhead, Xnode) \
diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h
index 7e0fc02..dc76a87 100644
--- a/lib/isc/include/isc/types.h
+++ b/lib/isc/include/isc/types.h
@@ -13,6 +13,7 @@
#pragma once
+#include <isc/atomic.h>
#include <isc/result.h>
/*! \file isc/types.h
@@ -74,10 +75,11 @@ typedef struct isc_rwlock isc_rwlock_t; /*%< Read Write Lock */
typedef struct isc_sockaddr isc_sockaddr_t; /*%< Socket Address */
typedef ISC_LIST(isc_sockaddr_t) isc_sockaddrlist_t; /*%< Socket Address List
* */
-typedef struct isc_stats isc_stats_t; /*%< Statistics */
-typedef int_fast64_t isc_statscounter_t;
-typedef struct isc_symtab isc_symtab_t; /*%< Symbol Table */
-typedef struct isc_task isc_task_t; /*%< Task */
+typedef struct isc_stats isc_stats_t; /*%< Statistics */
+typedef int_fast64_t isc_statscounter_t;
+typedef atomic_int_fast64_t isc_atomic_statscounter_t;
+typedef struct isc_symtab isc_symtab_t; /*%< Symbol Table */
+typedef struct isc_task isc_task_t; /*%< Task */
typedef ISC_LIST(isc_task_t) isc_tasklist_t; /*%< Task List */
typedef struct isc_taskmgr isc_taskmgr_t; /*%< Task Manager */
typedef struct isc_textregion isc_textregion_t; /*%< Text Region */