Type questions

Michael Neumann mneumann at ntecs.de
Sat Jun 7 07:51:02 PDT 2008


Hi,

I'd like to return booleans from some kernel functions. Is there a
"boolean_t" in Dragonfly and is it possible to use "true" and "false"?
Or do I have to use type _Bool and #include <stdbool.h>? Stuff like that
is so common that in case of the kernel, I'd suggest to make it the
default (like NULL).
I see uint32_t and u_int32_t declarations. What's the difference and
which one is recommended?
Is it recommended or not to use C99? For example:

  for (int i=...)

This makes sometimes for cleaner code.

Or variadic macros:

  DPRINTF((...))

doesn't always look so nice.

Regards,

  Michael





More information about the Kernel mailing list