Skip to content

Commit cedc82c

Browse files
committed
struct sysinit: Add SLIST_ENTRY(sysinit) next
This will be used to put SYSINITs onto a linked list. Reviewed by: jhb, emaste Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41074
1 parent 5f35871 commit cedc82c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

share/man/man9/SYSINIT.9

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ are defined in
6060
struct sysinit {
6161
enum sysinit_sub_id subsystem; /* subsystem identifier*/
6262
enum sysinit_elem_order order; /* init order within subsystem*/
63+
SLIST_ENTRY(sysinit) next; /* singly-linked list */
6364
sysinit_cfunc_t func; /* function */
6465
const void *udata; /* multiplexer/argument */
6566
};

sys/sys/kernel.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
#ifdef _KERNEL
5252

53-
/* for intrhook below */
53+
/* for intrhook and sysinit linked list below */
5454
#include <sys/queue.h>
5555

5656
/* for timestamping SYSINITs; other files may assume this is included here */
@@ -220,6 +220,7 @@ typedef void (*sysinit_cfunc_t)(const void *);
220220
struct sysinit {
221221
enum sysinit_sub_id subsystem; /* subsystem identifier*/
222222
enum sysinit_elem_order order; /* init order within subsystem*/
223+
SLIST_ENTRY(sysinit) next; /* singly-linked list */
223224
sysinit_cfunc_t func; /* function */
224225
const void *udata; /* multiplexer/argument */
225226
};
@@ -260,6 +261,7 @@ sysinit_tslog_shim(const void * data)
260261
static struct sysinit uniquifier ## _sys_init = { \
261262
subsystem, \
262263
order, \
264+
{ NULL }, \
263265
sysinit_tslog_shim, \
264266
&uniquifier ## _sys_init_tslog \
265267
}; \
@@ -269,6 +271,7 @@ sysinit_tslog_shim(const void * data)
269271
static struct sysinit uniquifier ## _sys_init = { \
270272
subsystem, \
271273
order, \
274+
{ NULL }, \
272275
func, \
273276
(ident) \
274277
}; \
@@ -286,6 +289,7 @@ sysinit_tslog_shim(const void * data)
286289
static struct sysinit uniquifier ## _sys_uninit = { \
287290
subsystem, \
288291
order, \
292+
{ NULL }, \
289293
func, \
290294
(ident) \
291295
}; \

0 commit comments

Comments
 (0)