|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] xen: cache current vcpu
>>> Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 29.10.07 18:23 >>>
>Gcc is quite capable of eliminating common subexpressions involving
>current(), ...
I have to partly disagree here: While gcc is capable of doing this, it cannot
do anything about uses of current that have function calls in between, and
I also don't think making get_current() an __attribute__((__pure__)) inline
function would be correct.
I do agree that in certain places using current is more readable, albeit I
think that there are quite a few places where it is already non-obvious that
'v' denotes 'current' (perhaps naming might just help here - if 'v' only ever
gets set from 'current' in a function, renaming it to 'cur' might be reasonable
to consider).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|