Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932506AbZJNTQp (ORCPT ); Wed, 14 Oct 2009 15:16:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755014AbZJNTQg (ORCPT ); Wed, 14 Oct 2009 15:16:36 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:54865 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932411AbZJNTQe (ORCPT ); Wed, 14 Oct 2009 15:16:34 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Message-ID: <4AD6235B.8090905@s5r6.in-berlin.de> Date: Wed, 14 Oct 2009 21:15:39 +0200 From: Stefan Richter User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090926 SeaMonkey/1.1.17 MIME-Version: 1.0 To: "Leonidas ." CC: Gleb Natapov , linux-kernel Subject: Re: How to check whether executing in atomic context? References: <20091014101336.GA25108@redhat.com> <4AD60CD1.4000804@s5r6.in-berlin.de> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1142 Lines: 27 Leonidas . wrote: > On Wed, Oct 14, 2009 at 11:09 PM, Stefan Richter > wrote: >> let the caller of your routine tell it whether it's atomic context >> or not. [...] > What makes it more complicated is this, the user might achieve the > functionality via instrumenting his source code, i.e. something like > using -finstrument flag of gcc. As per above inferences about > in_atomic(), in case of instrumentation there is no choice other than > providing all apis as atomic apis, this might not be the right thing > to do under all circumstances. Especially, for my code since I do lot > of allocations for book keeping. > > I am not aware of any Linux kernel module which can comply to this > kind of use case, what would be the most optimal thing to do here? And preallocation is not feasible either? -- Stefan Richter -=====-==--= =-=- -===- http://arcgraph.de/sr/ -- 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/