[Click] CLICK_BYTE_ORDER

Koen Beel koen.beel at gmail.com
Fri Aug 4 10:28:49 EDT 2006


One more thing:

Why would one use e.g. (see elements/ip/checkipheader.hh):
'bool _verbose : 1;'   ?
This is a bool bitfield, but why not use just 'bool _verbose;' ? Like
'bool _checksum;' in checkipheader.hh
Is't the bool bitfield slower because of the use of bitmasks?


On 8/3/06, Beyers Cronje <bcronje at gmail.com> wrote:
> Hi Koen
>
>
>
> > And atomic? When do you have 'synchronization'? e.g. in
> > elements/ip/checkipheader.hh:
> > -for _offset they just use unsigned
> > -and for _drops they use atomic_uint32_t
> > What's the difference? (why use unsigned for one and atomic for the
> other?)
>
> _offset gets set once during startup and never changes. _drops are mutable
> and during SMP Click operations you require synchronization.
>
> In short, if you are using standard Click then you never need worry about
> atomic ints, ONLY when you pln to use SMP Click.
>
> Beyers
>


More information about the click mailing list