On 12 May 2005, at 22:06, Scott Parish wrote:
> For PAE, l2e_get_phys() will look something like this:
>
> #define l2e_get_phys(_x) ((((u64)(_x).l2_hi & 0x0f) <<
32)
> |\
> ((u64)(_x).l2_lo & PAGE_MASK))
>
> Thus l2e_get_phys(++foo) is not safe, as the increment will be
> evaluated
> multiple times and at undefined times.
This leaves the macro to bite you in future. Either make l2e_get_phys()
a static inline function, or do something like:
#define l2e_get_phys(_x) ({ \
u64 __x = (_x); \
<your macro here but _x -> __x>; \
})
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel