From owner-freebsd-threads@FreeBSD.ORG Sat Jul 31 09:29:29 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20B7F16A4CE for ; Sat, 31 Jul 2004 09:29:29 +0000 (GMT) Received: from smarthost.enta.net (smarthost.enta.net [195.74.97.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EC5343D5F for ; Sat, 31 Jul 2004 09:29:28 +0000 (GMT) (envelope-from jacs@gnome.co.uk) Received: from smartsmtp.enta.net (smtp.enta.net [195.74.97.230]) by smarthost.enta.net (Postfix) with ESMTP id 3FA43F639D for ; Sat, 31 Jul 2004 10:29:01 +0100 (BST) Received: from smtp.enta.net (localhost [127.0.0.1]) by smartsmtp.enta.net (8.12.3/8.12.3) with ESMTP id i6V9TCfi051738 for ; Sat, 31 Jul 2004 10:29:13 +0100 (BST) (envelope-from jacs@gnome.co.uk) Received: from hawk.gnome.co.uk (81-31-113-153.adsl.entanet.co.uk [81.31.113.153]) by smtp.enta.net (Postfix) with SMTP id 8606F98144 for ; Sat, 31 Jul 2004 10:29:12 +0100 (BST) Received: from kite (kite.gnome.co.uk [192.168.123.3]) by hawk.gnome.co.uk (8.12.10/8.12.10) with SMTP id i6V9Sqse036796 for ; Sat, 31 Jul 2004 10:28:52 +0100 (BST) (envelope-from jacs@gnome.co.uk) Message-ID: <002c01c476e0$cb53b8b0$037ba8c0@gnome.co.uk> From: "Chris Stenton" To: Date: Sat, 31 Jul 2004 10:28:52 +0100 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.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Scanned-By: MIMEDefang 2.44 Subject: difference between tsleep and usleep in a thread on FreeBSD 5.2.1 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2004 09:29:29 -0000 Hi, I am trying to track down a bug in a pthreaded programme and wonder if someone could help. One of the threads calls a kernel module that puts the process in tsleep until a defined event occurs. However, in this state all other threads are not serviced. If I however replace this with a straight usleep in the thread then all other threads get serviced during that period. Could someone tell me the difference between the two forms of sleep in a thread so it may help me track down the problem. Could you email replies as I am not on this list. Thanks Chris