[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectget_current is __pure__, maybe __const__ even
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.

At the very least, __attribute__((__pure__))
will apply to your get_current function.

I think __attribute__((__const__)) will too,
even though it's technically against the
documentation. While you do indeed read from
memory, you don't read from memory that could
be seen as changing. Nothing done during the
lifetime of a task will change "current" as
viewed from within that task.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:06    [W:0.053 / U:7.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site