Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 7900cbd

Browse files
committed
Merge branch 'ondrej/cleanup-isc_astack-usage-in-netmgr' into 'main'
Convert isc_astack usage in netmgr to mempool and ISC_LIST See merge request isc-projects/bind9!7300
2 parents 8de2c73 + 10f884a commit 7900cbd

File tree

6 files changed

+59
-209
lines changed

6 files changed

+59
-209
lines changed

lib/isc/Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ libisc_la_HEADERS = \
88
include/isc/align.h \
99
include/isc/ascii.h \
1010
include/isc/assertions.h \
11-
include/isc/astack.h \
1211
include/isc/async.h \
1312
include/isc/atomic.h \
1413
include/isc/attributes.h \
@@ -122,7 +121,6 @@ libisc_la_SOURCES = \
122121
aes.c \
123122
ascii.c \
124123
assertions.c \
125-
astack.c \
126124
async.c \
127125
backtrace.c \
128126
base32.c \

lib/isc/astack.c

Lines changed: 0 additions & 85 deletions
This file was deleted.

lib/isc/include/isc/astack.h

Lines changed: 0 additions & 49 deletions
This file was deleted.

lib/isc/include/isc/types.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333

3434
/* Core Types. Alphabetized by defined type. */
3535

36-
typedef struct isc_astack isc_astack_t; /*%< Array-based fast stack */
37-
typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
38-
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
36+
typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
37+
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
3938
typedef struct isc_constregion isc_constregion_t; /*%< Const region */
4039
typedef struct isc_consttextregion isc_consttextregion_t; /*%< Const Text Region
4140
*/

lib/isc/netmgr/netmgr-int.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <openssl/err.h>
1919
#include <openssl/ssl.h>
2020

21-
#include <isc/astack.h>
2221
#include <isc/atomic.h>
2322
#include <isc/barrier.h>
2423
#include <isc/buffer.h>
@@ -201,6 +200,7 @@ typedef struct isc__networker {
201200

202201
ISC_LIST(isc_nmsocket_t) active_sockets;
203202

203+
isc_mempool_t *uvreq_pool;
204204
} isc__networker_t;
205205

206206
ISC_REFCOUNT_DECL(isc__networker);
@@ -245,6 +245,7 @@ struct isc_nmhandle {
245245
int backtrace_size;
246246
#endif
247247
LINK(isc_nmhandle_t) active_link;
248+
LINK(isc_nmhandle_t) inactive_link;
248249
void *opaque;
249250
};
250251

@@ -323,6 +324,7 @@ struct isc__nm_uvreq {
323324
uv_fs_t fs;
324325
} uv_req;
325326
ISC_LINK(isc__nm_uvreq_t) link;
327+
ISC_LINK(isc__nm_uvreq_t) inactive_link;
326328
};
327329

328330
void *
@@ -987,8 +989,7 @@ struct isc_nmsocket {
987989
* 'spare' handles for that can be reused to avoid allocations,
988990
* for UDP.
989991
*/
990-
isc_astack_t *inactivehandles;
991-
isc_astack_t *inactivereqs;
992+
ISC_LIST(isc_nmhandle_t) inactive_handles;
992993

993994
/*%
994995
* Used to pass a result back from listen or connect events.

0 commit comments

Comments
 (0)