CLOCK querry

41 views
Skip to first unread message

CODENAME FREAK

unread,
May 14, 2013, 2:50:37 PM5/14/13
to min...@googlegroups.com
Greetings

It is a very basic question but I would like to know how the CLOCK task is started and where is the code located to which the ticks are forwarded ? The code that listens to hardware generated ticks is located in /kernel/clock.c "int timer_int_handler(void)" ,and also what is "int app_cpu_init_timer(unsigned freq)" and "int boot_cpu_init_timer(unsigned freq)" used for ??It might be for initialisation but what is the difference?

Antoine LECA

unread,
May 15, 2013, 5:32:20 AM5/15/13
to min...@googlegroups.com
CODENAME FREAK wrote:
> It is a very basic question but I would like to know how the CLOCK task is

Which version of MINIX?
(the mechanism changed...)


Antoine

Anubhav Guleria

unread,
May 15, 2013, 7:02:00 AM5/15/13
to min...@googlegroups.com
minix 3.2.1 and 3.2.0?
> --
> You received this message because you are subscribed to the Google Groups
> "minix3" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to minix3+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Tomas Hruby

unread,
May 15, 2013, 7:49:07 AM5/15/13
to min...@googlegroups.com
On Tue, May 14, 2013 at 11:50:37AM -0700, CODENAME FREAK wrote:
> Greetings
>
> It is a very basic question but I would like to know how the CLOCK task is
> started and where is the code located to which the ticks are forwarded ?
> The code that listens to hardware generated ticks is located in
> /kernel/clock.c "int timer_int_handler(void)"

This is exactly where the ticks are handled. Ticks are not forwarded
anywhere. One if a timer expires, the timer code sends a notification
to the process which registered the timer.

> ,and also what is "int
> app_cpu_init_timer(unsigned freq)" and "int boot_cpu_init_timer(unsigned
> freq)" used for ??It might be for initialisation but what is the difference?

One is initialization for the boot CPU and the other is for the
application cpus - the cpus that are started later after boot.

The difference is that if booted on a single CPU, we may or may not
use LAPIC timer. If not, we need to register the handler for the
legacy timer. LAPIC handler is hardwired in the interupt table and used
by all CPUs.
Reply all
Reply to author
Forward
0 new messages