From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 11 16:57:01 2004 Return-Path: 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 8575416A4CE; Mon, 11 Oct 2004 16:57:01 +0000 (GMT) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5050543D2D; Mon, 11 Oct 2004 16:57:01 +0000 (GMT) (envelope-from damien.bergamini@free.fr) Received: from COMETE (pasteur-1-82-67-68-158.fbx.proxad.net [82.67.68.158]) by postfix4-1.free.fr (Postfix) with SMTP id 586151F31FD; Mon, 11 Oct 2004 18:57:00 +0200 (CEST) Message-ID: <008401c4afb3$353f8aa0$9e444352@COMETE> From: "Damien Bergamini" To: "Daniel Eischen" References: Date: Mon, 11 Oct 2004 18:56:09 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 cc: freebsd-hackers@freebsd.org Subject: Re: msleep(9) and recursed mutex X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2004 16:57:01 -0000 Thanks for your answer. I'll try your solution with condition variables and I'll let you know about the results. What I really want to do is quite simple: avoid wakeup_before_sleep conditions. -- Damien Bergamini | Really, you want to be using condition variables. Use a mutex | to protect your data and use cv_{timed}wait{_sig}() to sleep. | When the interrupt occurs, you use cv_signal() or cv_broadcast() | to wake up any waiters. | | -- | DE