tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
introducing flags_t
Hi!
In many places we use 'int' for flags.
Also in most places, the flag is checked this way:
if (flags & FLAGX)
do_something();
This is problematic when the top-most bit is used.
Per discussion with christos@ on source-changes-d@
I changed pmap to use u_int for the flags - almost.
I didn't change the ctor and dtor functions because that would imply
to change pool and pool_cache.
For better clarity and readability, I would like to use
a flags_t type.
Open questions:
- Where should it be defined? MI or MD?
- How should it be defined? Is 'typedef u_int flags_t;' ok?
- What about namespace pollution?
Christoph
Home |
Main Index |
Thread Index |
Old Index