What does it do?
ceesafec converts code written in CeeSafe to C11, which the target kernel’s existing C compiler compiles using its own flags and headers. Fields of external C structs are referenced from the actual headers, so configuration dependent changes to fields produce build errors. The compiler infers functions’ sleep and alloc effects to check calls that are disallowed while holding a spinlock or in an interrupt context. The freestanding profile generates relocatable objects for kernel builds.
Key features
- Check single ownership, moves, and shared and exclusive borrowing rules
- Generate C11 code that can be built with an existing C compiler
- Reference actual struct fields in kernel headers and check declared types
- Infer sleep and alloc effects to check call constraints in atomic and irq contexts
- Generate relocatable objects with the freestanding profile