Roland Mainz wrote:
Roland Mainz wrote:
Are there any objections that I move <stdbool.h> to <sys/stdbool.h> (and
create a new <stdbool.h> which sources <sys/stdbool.h>) that (new)
kernel code can use the new C99 datatype |bool| ([1]) ? Note that I do
not intent do replace |boolean_t| in existing code, only allow that new
stuff (optionally) can use this C99 feature...
[1]=Note that |bool| differs from the traditional kernel-land
|boolean_t| datatype that it is smaller (e.g.
|sizeof(boolean_t)==sizeof(int)| vs. |sizeof(bool)==1|) and optionally
allows the compiler to do better optimisations on this datatype (since
it is allowed to assume that it only contains |true| and |false| as
values instead of the full range from |INT_MIN|-|INT_MAX| for
|boolean_t| (since this enum is treated as |int| by value-range
optimisations)) and usually reduces the size of executables (e.g.
partially cleaning-up libast's boolean usage with |bool| reduces the
size of libast.so.1 from 1177272 bytes to 1094488 bytes).
I've uploaded a webrev for the change as
http://cr.opensolaris.org/~gisburn/sys_stdbool_h/ ...
... can anyone review this patch, please ?
I have no issues with the idea or the implementation. You may list me
as a codereviewer on your RTI.
I'm assuming that the intent is that this is delivered as a single
changeset and not as part of some larger RTI.
--
Darren J Moffat
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code