Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267798AbUIOXhl (ORCPT ); Wed, 15 Sep 2004 19:37:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267774AbUIOXe4 (ORCPT ); Wed, 15 Sep 2004 19:34:56 -0400 Received: from holomorphy.com ([207.189.100.168]:416 "EHLO holomorphy.com") by vger.kernel.org with ESMTP id S267772AbUIOXaJ (ORCPT ); Wed, 15 Sep 2004 19:30:09 -0400 Date: Wed, 15 Sep 2004 16:29:56 -0700 From: William Lee Irwin III To: Jakub Jelinek Cc: Albert Cahalan , linux-kernel mailing list , ak@muc.de Subject: Re: get_current is __pure__, maybe __const__ even Message-ID: <20040915232956.GE9106@holomorphy.com> References: <1095288600.1174.5968.camel@cube> <20040915231518.GB31909@devserv.devel.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040915231518.GB31909@devserv.devel.redhat.com> Organization: The Domain of Holomorphy User-Agent: Mutt/1.5.6+20040722i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 28 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/