Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 6 Mar 2001 18:54:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 6 Mar 2001 18:54:39 -0500 Received: from nrg.org ([216.101.165.106]:36388 "EHLO nrg.org") by vger.kernel.org with ESMTP id ; Tue, 6 Mar 2001 18:54:26 -0500 Date: Tue, 6 Mar 2001 15:53:45 -0800 (PST) From: Nigel Gamble Reply-To: nigel@nrg.org To: Manoj Sontakke cc: linux-kernel@vger.kernel.org Subject: Re: spinlock help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Mar 2001, Manoj Sontakke wrote: > 1. when spin_lock_irqsave() function is called the subsequent code is > executed untill spin_unloc_irqrestore()is called. is this right? Yes. The protected code will not be interrupted, or simultaneously executed by another CPU. > 2. is this sequence valid? > spin_lock_irqsave(a,b); > spin_lock_irqsave(c,d); Yes, as long as it is followed by: spin_unlock_irqrestore(c, d); spin_unlock_irqrestore(a, b); Nigel Gamble nigel@nrg.org Mountain View, CA, USA. http://www.nrg.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/