From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 12 11:27:09 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 7CCD2106564A for ; Mon, 12 Sep 2011 11:27:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id ED3188FC0C for ; Mon, 12 Sep 2011 11:27:08 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p8CBR3Dt022038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Sep 2011 14:27:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p8CBR3RF047328; Mon, 12 Sep 2011 14:27:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p8CBR38H047327; Mon, 12 Sep 2011 14:27:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 12 Sep 2011 14:27:03 +0300 From: Kostik Belousov To: Marc L?rner Message-ID: <20110912112703.GO17489@deviant.kiev.zoral.com.ua> References: <20110912094842.251380@gmx.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8fdAbLF0bbg2TsS/" Content-Disposition: inline In-Reply-To: <20110912094842.251380@gmx.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: filippo.sironi@gmail.com, freebsd-hackers@freebsd.org Subject: Re: 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 11:27:09 -0000 --8fdAbLF0bbg2TsS/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 12, 2011 at 11:48:42AM +0200, "Marc L?rner" wrote: > Hello, > what about changing order of callout_reset and uprintf? > And your timeout isn't 1minute, it's one second! >=20 > Regards, > Marc >=20 > >I already did that to ensure timer_event_handler would be called correct= ly. > > > >The result follows: > > > >freebsd# kldload ./timer.ko=20 > >timer_event_handler() with MOD_LOAD > > > >freebsd# kldunload ./timer.ko=20 > >timer_event_handler() with MOD_UNLOAD > > > >and I maintained the module load for about 1 minute so the timer printin= g >"Hello, World!" should have been run. > > > >Filippo > > > >On 12/set/2011, at 11:24, Adrian Chadd wrote: > > > >> How about adding some printfs() to the functions to ensure they're bei= ng called? > >>=20 The callouts are executed in the context that does not have the controlling terminal. uprintf(9) tries to use the ctty for output. Use printf(9) to get something on console. --8fdAbLF0bbg2TsS/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk5t7IcACgkQC3+MBN1Mb4iyzQCfbwFFVQnPHcMCwNWVsk+QKL7X dtUAoIL3v6D9FbH1yO0c0epPUovv3W0D =aUjh -----END PGP SIGNATURE----- --8fdAbLF0bbg2TsS/--