From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 4 03:22:01 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9390116A405 for ; Sun, 4 Feb 2007 03:22:01 +0000 (UTC) (envelope-from luping.nju@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by mx1.freebsd.org (Postfix) with ESMTP id 57C1813C471 for ; Sun, 4 Feb 2007 03:22:01 +0000 (UTC) (envelope-from luping.nju@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1221262wxc for ; Sat, 03 Feb 2007 19:22:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=S2j3Vp5ZiH/oEyk0YmZXmdAy18d0LvSxChafKlRs5Jc2SrtTdn20R9ILeHbO4YmAy49psoNRvSYEmjYm3qpnM+/RnYo+vs+5z+BQmQ1rUWbZgssQ7g13KoM2r3N1Nth22y/hBmsV6N4EtSlHhXf0zYfSuqmlbSspzHD59yei/zE= Received: by 10.70.32.13 with SMTP id f13mr9071849wxf.1170557660158; Sat, 03 Feb 2007 18:54:20 -0800 (PST) Received: by 10.70.7.7 with HTTP; Sat, 3 Feb 2007 18:54:20 -0800 (PST) Message-ID: Date: Sat, 3 Feb 2007 21:54:20 -0500 From: "lu ping" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: "sleep" in freebsd kernel 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: Sun, 04 Feb 2007 03:22:01 -0000 Hey Folks, I have a kernel thread running as a daemon, and I want to make it sleep for a while in an infinite loop. I guess I can use "tsleep" but it only timeout after intergal system ticks, which only has millisecond granularity, but I want to make it sleep in some microsecond. Is there any way I can do this in the kernel?