From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 27 16:46:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 175AC16A41F for ; Thu, 27 Oct 2005 16:46:20 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 90CAF43D46 for ; Thu, 27 Oct 2005 16:46:18 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 93840 invoked by uid 0); 27 Oct 2005 16:46:16 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 27 Oct 2005 16:46:16 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id j9RGk3MO017438; Fri, 28 Oct 2005 00:46:03 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <4361044B.50807@alphaque.com> Date: Fri, 28 Oct 2005 00:46:03 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Scott Long References: <435EEC56.9080708@samsco.org> <200510261130.45506.jhb@freebsd.org> <435FA6A9.4000600@samsco.org> <200510261324.03790.jhb@freebsd.org> <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> In-Reply-To: <4360DD7B.20900@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 16:46:20 -0000 On 10/27/05 22:00 Scott Long said the following: > are doing. Other than that, there likely isn't anything that you need > to do for 'locking' in 4.x. The kernel is non-reentrant there, so you > don't need to worry about synchronizing multiple threads. thanx a bunch, scott. it's been a nightmare trying to debug the driver and to try to find out why the driver compiled from the same source tree works on freebsd 5.x and doesnt work at all on freebsd 4.x . so far, i've been gloriously unsuccesful at this, and am getting at my wits end on what to go look at. the userland application uses pthreads, and works like a charm both on 4.x and 5.x without using the device. however, when the device is used, it somehow has synchronization errors on 4.x, leading to timers (created in the userland app) timing out and the like. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+