From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 28 02:54:56 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 C7B2916A420 for ; Fri, 28 Oct 2005 02:54:56 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 244BD43D53 for ; Fri, 28 Oct 2005 02:54:56 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9S2qn8Y048554; Thu, 27 Oct 2005 20:52:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 27 Oct 2005 20:52:50 -0600 (MDT) Message-Id: <20051027.205250.55834228.imp@bsdimp.com> To: dinesh@alphaque.com From: "M. Warner Losh" In-Reply-To: <4361044B.50807@alphaque.com> References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 27 Oct 2005 20:52:52 -0600 (MDT) Cc: freebsd-hackers@freebsd.org, scottl@samsco.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: Fri, 28 Oct 2005 02:54:56 -0000 In message: <4361044B.50807@alphaque.com> Dinesh Nair writes: : 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. libc_r will block all other threads in the application while an ioctl executes. libpthread and libthr won't. I've had several bugs at work that can be traced to faulty drivers and/or faulty APIs that were specified by people who were unaware of this issue... Warner