Type questions

Sascha Wildner saw at online.de
Sat Jun 7 08:04:02 PDT 2008


Michael Neumann wrote:
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).
We do have boolean_t (which resolves to int).

I see uint32_t and u_int32_t declarations. What's the difference and
which one is recommended?
No difference, the standard types (uint32_t etc.) are preferred.

Is it recommended or not to use C99? For example:

   for (int i=...)
Hmm, personally I wouldn't mind in this case, but others may have 
different opinions.

Sascha

--
http://yoyodyne.ath.cx




More information about the Kernel mailing list