From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 22 22:28:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E7FB16A400 for ; Fri, 22 Feb 2008 22:28:51 +0000 (UTC) (envelope-from kayve@sfsu.edu) Received: from iron3.sfsu.edu (iron3.sfsu.edu [130.212.10.128]) by mx1.freebsd.org (Postfix) with ESMTP id 01A4013C474 for ; Fri, 22 Feb 2008 22:28:50 +0000 (UTC) (envelope-from kayve@sfsu.edu) X-onepass: IPPSC X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAN7avkeC1Apk/2dsb2JhbACvHwQ Received: from smtp01.sfsu.edu ([130.212.10.100]) by iron3.sfsu.edu with ESMTP; 22 Feb 2008 14:28:50 -0800 Received: from apollo ([130.212.10.167]) by mail05a.sfsu.edu (Lotus Domino Release 7.0.3HF100) with ESMTP id 2008022214284931-4309 ; Fri, 22 Feb 2008 14:28:49 -0800 Date: Fri, 22 Feb 2008 14:28:49 -0800 (PST) From: KAYVEN RIESE X-X-Sender: kayve@apollo To: "Heiko Wundram (Beenic)" In-Reply-To: <200802221437.48293.wundram@beenic.net> Message-ID: References: <200802221558.42443.sharadc@in.niksun.com> <200802221437.48293.wundram@beenic.net> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on MAIL05a/SERVERS/SFSU(Release 7.0.3HF100 | December 5, 2007) at 02/22/2008 14:28:49, Serialize by Router on SMTP01/SERVERS/SFSU(Release 7.0.3|September 26, 2007) at 02/22/2008 14:28:49, Serialize complete at 02/22/2008 14:28:49 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: usleep 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, 22 Feb 2008 22:28:51 -0000 On Fri, 22 Feb 2008, Heiko Wundram (Beenic) wrote: > Am Freitag, 22. Februar 2008 11:28:42 schrieb Sharad Chandra: >> Does usleep work for you? i just saw it is implemented over nanosleep >> which passes a struct timeval to "select". > > Quoting from POSIX: > > """ > The usleep() function will cause the calling thread to be suspended from > execution until either the number of real-time microseconds specified by the > argument useconds has elapsed or a signal is delivered to the calling thread > and its action is to invoke a signal-catching function or to terminate the > process. The suspension time may be longer than requested due to the > scheduling of other activity by the system. > """ oh.. you DID say "microseconds" .. i was going to assume complete ignorance in pointing out that "u" is used because it looks remotely like the greek letter "mu" which is the metric abbreviation for "micro" wich is 10^-6 hope i am not being real obvious. > > See the last sentence, specifically. > > So, yes, the behaviour you're seeing is pretty much expected, simply because > _user_ processes are scheduled in timeslices, which depend on the HZ setting > of the kernel. > > -- > Heiko Wundram > Product & Application Development > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > *----------------------------------------------------------* Kayven Riese, BSCS, MS (Physiology and Biophysics) (415) 902 5513 cellular http://kayve.net Webmaster http://ChessYoga.org *----------------------------------------------------------*