Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755944AbZJVNoh (ORCPT ); Thu, 22 Oct 2009 09:44:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755597AbZJVNoh (ORCPT ); Thu, 22 Oct 2009 09:44:37 -0400 Received: from casper.infradead.org ([85.118.1.10]:33531 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754812AbZJVNog (ORCPT ); Thu, 22 Oct 2009 09:44:36 -0400 Date: Thu, 22 Oct 2009 06:45:38 -0700 From: Arjan van de Ven To: "Leonidas ." Cc: linux-kernel Subject: Re: Can current macro be accessed from interrupt context? Message-ID: <20091022064538.25837421@infradead.org> In-Reply-To: References: Organization: Intel X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1146 Lines: 31 On Thu, 22 Oct 2009 04:10:49 -0700 "Leonidas ." wrote: > Hello, > > Going through UTLK, it says that current macro makes sense only in > case of process context, > in case of interrupt context it is invalid. > > But current would still be pointing to interrupted process right? The > pointer would still be valid? > Can I safely assume that whether or not interrupt handlers are > executing on separate stacks or > interrupted threads stack, current macro can be accessed from > interrupt context? not for interrupt threads, and that's where things are moving to. for interrupt stacks you ought to be fine (current is just a pointer on the stack, and last I looked we copied that pointer for each interrupt to the irq stack) -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/