puppy
puppy copied to clipboard
Kernel objects
This is much more of a wishlist item that anything concretely actionable at this point, but here's the gist
All long-lived objects in kernel space that represent something that userspace can interact with (so, things like a semaphore, a file, a disk, ...) should be represented as deriving from a common kobject_t base class.
kobject_t would expose:
- LLVM-style RTTI with globally unique types and a hierarchy (so one would have
object,synch_object,semaphoreas elements of the hierarchy) - this could probably be defined in (one or more) .tbl file and imported as needed somehow; shared_ptrreference counting semantics;- support for being written into logs easily (probably with a custom printf formatter %K);
- trivial to insert into handle tables and type-checked on extraction from such