From: H. P. A. <hp...@zy...> - 2009-10-08 15:13:17
|
On 10/08/2009 08:02 AM, Cyrill Gorcunov wrote: > > ok, something like this? > Yes, but rather than changing int32_t to uint32_t, we should change it to opflags_t... we already have the typedef, it's just not widely used. > > +#define is_class(class, op) (((op) & class) == class) > + We might as well use the form that we have been using before, that also avoids using the arguments to the macro more than one. We should probably add explicit casts, too: #define is_class(class, op) (!((opflags_t)(class) & ~(opflags_t)(op))) -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. |