lkml.org 
[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: get_current is __pure__, maybe __const__ even
On Wed, Sep 15, 2004 at 06:50:00PM -0400, Albert Cahalan wrote:
>> 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.

On Wed, Sep 15, 2004 at 07:15:18PM -0400, Jakub Jelinek wrote:
> current will certainly change in schedule (),
> so either you'd need to avoid using current
> in schedule() and use some other accessor
> for the same without such attribute, or
> #ifdef the attribute out when compiling sched.c.

Why would barrier() not suffice?


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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