NetBSD/sys/miscfs
pgoyette 97b627eca5 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.
2019-08-07 00:38:01 +00:00
..
deadfs Add "void *extra" argument to vcache_new() so a file system may 2019-01-01 10:06:54 +00:00
fdesc Rename min/max -> uimin/uimax for better honesty. 2018-09-03 16:29:22 +00:00
fifofs
genfs Many years ago someone created a new __link_set_sysctl_funcs to hold 2019-08-07 00:38:01 +00:00
kernfs Rename min/max -> uimin/uimax for better honesty. 2018-09-03 16:29:22 +00:00
nullfs Set "mnt_lower" before the first file system operation on the new file system. 2019-02-20 10:05:59 +00:00
overlay Set "mnt_lower" before the first file system operation on the new file system. 2019-02-20 10:05:59 +00:00
procfs Restore mapping of file id to pid/type/fd. 2019-04-25 22:48:42 +00:00
specfs Rename min/max -> uimin/uimax for better honesty. 2018-09-03 16:29:22 +00:00
umapfs Set "mnt_lower" before the first file system operation on the new file system. 2019-02-20 10:05:59 +00:00
Makefile