Re: get_current is __pure__, maybe __const__ even

Andi Kleen
2004-09-16T06:58:43Z

Albert Cahalan <albert@users.sf.net> writes:

> Andi Kleen writes:
>
>> Please CSE "current" manually. It generates
>> much better code on some architectures
>> because the compiler cannot do it for you.
>
> This looks fixable.

I tried it some years ago, but I ran into problems with the scheduler
and some other code and dropped it.

One problem is that gcc doesn't have a "drop all const/pure
cache values" barrier. Without this I don't think it can be
safely implemented.

-Andi