Commit 112700

2026-10-30 07:48:23 Bob Green: -/-
project ideas/operating system/netbsd port.md ..
@@ 1186,12 1186,12 @@
How it fits into hb68k: a timer driver provides only mechanism. The clock code in hb68k/clock.c owns the policy and calls the driver through four functions in a small table (struct clock_if):
- | Function | When it’s called | What it does |
- | --------------------- | -------------------------- | ------------ |
- | clk_init | once, late in boot | establishes the interrupt at IPL_SCHED |
- | clk_arm(interval_us) | once, right after init | starts periodic interrupts, e.g. every 10 000 µs for 100 Hz |
- | clk_intr | at the start of every tick | acknowledges the interrupt, and reloads if needed |
- | clk_disarm | shutdown or error | stops the timer |
+ | Function | When it’s called | What it does |
+ | ---------------------- | -------------------------- | ------------ |
+ | `clk_init` | once, late in boot | establishes the interrupt at IPL_SCHED |
+ | `clk_arm(interval_us)` | once, right after init | starts periodic interrupts, e.g. every 10 000 µs for 100 Hz |
+ | `clk_intr` | at the start of every tick | acknowledges the interrupt, and reloads if needed |
+ | `clk_disarm` | shutdown or error | stops the timer |
The file header explains:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9