From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756960AbYEOAat (ORCPT ); Wed, 14 May 2008 20:30:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754001AbYEOAaj (ORCPT ); Wed, 14 May 2008 20:30:39 -0400 Received: from ozlabs.org ([203.10.76.45]:55406 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbYEOAaj (ORCPT ); Wed, 14 May 2008 20:30:39 -0400 From: Rusty Russell To: "Matti Linnanvuori" Subject: Re: [patch] doc: add a chapter about trylock functions [Bug 9011] Date: Thu, 15 May 2008 10:30:18 +1000 User-Agent: KMail/1.9.9 Cc: "Randy Dunlap" , "Andrew Morton" , Ingo Molnar , linux-kernel@vger.kernel.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805151030.18959.rusty@rustcorp.com.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 14 May 2008 01:31:47 Matti Linnanvuori wrote: > + mutex_trylock() does not suspend your task > + but returns non-zero if it could lock the mutex on the first try > + or 0 if not. This function cannot be safely used in hardware or > + software interrupt contexts despite not sleeping. I know this is what the documentation says, but I can't see why. Ingo? Thanks, Rusty. PS. Patch fixed up and applied.