Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys
Module Name: src
Committed By: pgoyette
Date: Wed Aug 7 00:38:02 UTC 2019
Modified Files:
src/sys/dev: ccd.c
src/sys/dev/iscsi: iscsi_main.c
src/sys/dev/usb: usbnet.c
src/sys/kern: kern_module.c sysv_ipc.c sysv_msg.c sysv_sem.c sysv_shm.c
src/sys/miscfs/genfs: layer_vfsops.c
src/sys/sys: module.h msg.h sem.h shm.h
Log Message:
Many years ago someone created a new __link_set_sysctl_funcs to hold
the list of routines that need to be called for setting up sysctl
variables. This worked great for all code included in the kernel
itself, but didn't deal with modules that want to create their own
sysctl data. So, we ended up with a lot of #ifdef _MODULE blocks
so modules could explicitly call their setup functions when loaded
as non-built-in modules.
So today, we complete the task that was started so many years ago.
When modules are loaded, after we've called xxx_modcmd(INIT...) we
check if the module contains its own __link_set_sysctl_funcs, and
if so we call the functions listed. We add a struct sysctllog member
to the struct module so we can call sysctl_teardown() when the module
gets unloaded. (The sequence of events ensures that the sysctl stuff
doesn't get created until the rest of the module's init code does any
required memory allocation.)
So, no more need to explicitly call the sysctl setup routines when
built as a loadable module.
To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/dev/ccd.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/iscsi/iscsi_main.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/usbnet.c
cvs rdiff -u -r1.136 -r1.137 src/sys/kern/kern_module.c \
src/sys/kern/sysv_shm.c
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/sysv_ipc.c
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/sysv_msg.c
cvs rdiff -u -r1.97 -r1.98 src/sys/kern/sysv_sem.c
cvs rdiff -u -r1.51 -r1.52 src/sys/miscfs/genfs/layer_vfsops.c
cvs rdiff -u -r1.46 -r1.47 src/sys/sys/module.h
cvs rdiff -u -r1.27 -r1.28 src/sys/sys/msg.h
cvs rdiff -u -r1.33 -r1.34 src/sys/sys/sem.h
cvs rdiff -u -r1.52 -r1.53 src/sys/sys/shm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index