Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Sep 2011 13:36:20 +0200
From:      Attilio Rao <attilio@freebsd.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        filippo.sironi@gmail.com, freebsd-hackers@freebsd.org, Marc L?rner <loerner@gmx.de>
Subject:   Re: Re: Kernel timers infrastructure
Message-ID:  <CAJ-FndDSAiWu1vjKSHy9OEMnGRFY-fK3DswVuO9ZwbOHMXX3Sw@mail.gmail.com>
In-Reply-To: <20110912112703.GO17489@deviant.kiev.zoral.com.ua>
References:  <20110912094842.251380@gmx.net> <20110912112703.GO17489@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Besides I'd also suggest to have the callout rearming as the very last
step of you callback in order to avoid buffering interleaving issues.

Attilio

2011/9/12 Kostik Belousov <kostikbel@gmail.com>:
> 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!
>>
>> Regards,
>> Marc
>>
>> >I already did that to ensure timer_event_handler would be called correctly.
>> >
>> >The result follows:
>> >
>> >freebsd# kldload ./timer.ko
>> >timer_event_handler() with MOD_LOAD
>> >
>> >freebsd# kldunload ./timer.ko
>> >timer_event_handler() with MOD_UNLOAD
>> >
>> >and I maintained the module load for about 1 minute so the timer printing >"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 being called?
>> >>
>
> 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.
>



-- 
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndDSAiWu1vjKSHy9OEMnGRFY-fK3DswVuO9ZwbOHMXX3Sw>