C++ in the kernel

Kip Macy kip.macy at gmail.com
Tue Oct 30 17:55:37 PDT 2007


> Pointer colors
> --------------
>
>             void * "userland" ptr;
>
>             Cannot be used as regular void *, but must be passed to
>             functions which has same color prototype.
>




> Integer endianess
> -----------------
>
>             uint32_t big_endian foo;
>
> Atomic variables
> ----------------
>
>             uint32_t atomic foo;


I know just from working in the linux code that sparse already
supports at least these 3 checks. I'm not saying this to advocate the
use of sparse but to point out that the use of annotations are already
being used to good effect on kernel code and are in not in  anyway
"exotic". I like the notion of K, but share the concerns that most
everyone has, and phk recognizes, about long-term maintenance of
"Kfront".

 -Kip


 -Kip


More information about the freebsd-arch mailing list