From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 12 12:19:06 2011 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 908271065672 for ; Mon, 12 Sep 2011 12:19:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 616F88FC18 for ; Mon, 12 Sep 2011 12:19:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EB26346B09; Mon, 12 Sep 2011 08:19:05 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AA068A02E; Mon, 12 Sep 2011 08:19:05 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 12 Sep 2011 08:19:04 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <023BD0FF-053C-4DCB-81EA-5D69B2411819@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109120819.05109.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 12 Sep 2011 08:19:05 -0400 (EDT) Cc: Filippo Sironi , Riccardo Cattaneo Subject: Re: Kernel timers infrastructure 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: Mon, 12 Sep 2011 12:19:06 -0000 On Monday, September 12, 2011 4:42:40 am Filippo Sironi wrote: > This is what I wrote for FreeBSD 7.2 and it does not work: callout_reset() is always going to return false here as you are never rescheduling an existing callout (it is either idle or has already fired each time you invoke callout_reset()). However, you are calling uprintf() from the kernel softclock thread and that thread is not attached to your tty, so the uprintf() is going to nowhere. Just use a regular printf and you will get your "Hello, World!" output once a second. -- John Baldwin