and switched to the serial monitor in QEMU. I timed it using a stop watch and I can see b in the serial console in 2.5 seconds, but in theory clock_wait should wait for 5 seconds.
and now the clock seems to be ticking properly. I will go through the osdev wiki on PICs once again to figure out why the code ticks twice as fast. So while I have "fixed" it, I'm yet to understand the cause.
Is this some thing other people can also replicate?
Hello!
I've been playing around with clock.c (from kernel).
I made the following change
in kernel/main.c
and switched to the serial monitor in QEMU. I timed it using a stop watch and I can see
b
in the serial console in 2.5 seconds, but in theoryclock_wait
should wait for 5 seconds.In
kernel/clock.c
, I modified line 29and now the clock seems to be ticking properly. I will go through the osdev wiki on PICs once again to figure out why the code ticks twice as fast. So while I have "fixed" it, I'm yet to understand the cause.
Is this some thing other people can also replicate?