Examples

Complete kernel modules built with gokm, each with a test program.

ExampleShows
examples/hellothe basics
examples/gcstressthe GC under pressure
examples/gofsa filesystem (gokm/fs)
examples/devices/dev/gorev with ioctls, /dev/gopipe with poll/blocking I/O, /proc/gorev
examples/gonetan IP device answering ping/UDP echo in atomic context, and an Ethernet one with ARP
examples/gobrda RAM disk, ported from Linux’s brd (gokm/blk, module parameters); GPL-2.0, like brd
examples/sysinfogokm/linux: functions, structs, inline functions, by-value structs, macros, pragmas

Each has a test program that make qemu runs inside a VM against the loaded module; test/fixtures cover load failures, nested and parked entries, parallelism, goroutines, heap growth and atomic-context misuse.