Adjust previous change so that it only replaces my home-grown define
for the end marker with the new official DDB_END_CMD marker that it
introduced. Undo the rest of that last change.
As the author of this example I'm pretty sure what example I wanted to
set and this narration order is an important part of it.
Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)
XXX kernel ABI change to devsw_detach signature requires bump
- pmap(9) needs uvm/uvm_extern.h.
- x86/pmap.h is not usable on its own; it is only usable if included
via uvm/uvm_extern.h (-> uvm/uvm_pmap.h -> machine/pmap.h).
- Make nvmm.h and nvmm_internal.h standalone.
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.
- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while
here.
ok chs@
explicitly set WARNS for modules that fail with WARNS=5.
Also, turn on -Wno-missing-noreturn for clang for some files.
At the moment, among ~ 360 modules,
- 2 (lua and zfs) need WARNS=0
- 1 (solaris) needs WARNS=1
- 136 need WARNS=3 (mostly due to sign-compare)
- 4 need WARNS=4
- others can be compiled with WARNS=5
Discussed on tech-kern.
The panic_string module accepts input from a device file over the write(2)
system call.
It prints panic(9) message passed from user space, e.g.:
echo "Hello world" > /dev/panic
If a string is empty or contain only whitespaces it's ignored and panic(9)
is not triggered. If a non printable character is passed within the input
buffer, the rest of the string is ignored.
This module performs the sync(8) operation before panic(9) to flush cache.
Submitted by Harry Pantazis.
Simplified and cleaned up by myself.
readhappy_mpsafe - demonstrates how to make a module MPSAFE
This module contains an additional helper program test_readhappy.c,
that is designed to exercise the kernel module with multiple threads.
Submitted by <Siddharth Muralee>
executor - basic implementation of callout and RUN_ONCE
While there, perform a small cleanup in README.
Patch by <Siddharth Muralee>
Polishing by myself.
This example presents a C module with its device (/dev entry) and its
content generator with algorithm defined in Lua state. The Lua state can
be changed dynamically from userland, without interruption of read(2) over
the device.
This is an example how to call Lua code from C.
previous single example.
These examples were provided by Kamil Rytarowski.
XXX These modules are built as part of a system build, but they
XXX are NOT installed in $DESTDIR.