From owner-freebsd-arch@FreeBSD.ORG Fri Mar 12 07:51:52 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0FC516A4CE for ; Fri, 12 Mar 2004 07:51:52 -0800 (PST) Received: from web42003.mail.yahoo.com (web42003.mail.yahoo.com [66.218.93.171]) by mx1.FreeBSD.org (Postfix) with SMTP id CB1EC43D3F for ; Fri, 12 Mar 2004 07:51:52 -0800 (PST) (envelope-from jpande_techinfo@yahoo.com) Message-ID: <20040312155151.38206.qmail@web42003.mail.yahoo.com> Received: from [202.144.61.162] by web42003.mail.yahoo.com via HTTP; Fri, 12 Mar 2004 07:51:51 PST Date: Fri, 12 Mar 2004 07:51:51 -0800 (PST) From: jitendra pande To: Dag-Erling "Smørgrav" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-arch@freebsd.org Subject: Re: How to use Kernel level mutex in FreeBSD 4.8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2004 15:51:53 -0000 Hi Dag-Erling..... Thanks a lot for the information. I tried using the splimp(..) and splx(..) within my driver and it works for the fisrt go..... But when i tried to do any other activity like pinging another machine/ starting a application then my client application using the driver crashes. The behavior is very erratic...in some cases it works even when doing any other operation/ but in another situataion it just crashes...... can u help me why this is happening......is there anything else i need to do.. any other way for mutual exclusion.... or some kernel level semaphore and so..... also any idea that in FreeBSD how does one determine the spl level at which a device's interrupt routines execute Thanks a lot for ur help.... Dag-Erling Smørgrav wrote: jitendra pande writes: > I am trying to use kernle level mutex in my driver for FreeBSD 4.8. > I tried searching for kernel level mutex but couldn't find any > information on the same. The FreeBSD 4 kernel is single-threaded. You don't need locking except to protect against interrupts (see spl(9)) DES -- Dag-Erling Smørgrav - des@des.no --------------------------------- Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster.