kernel: test: adjust tick-tock multithreading test timing
This commit is contained in:
@@ -22,9 +22,11 @@ void print_kernel_banner(void)
|
|||||||
void background_thread(void)
|
void background_thread(void)
|
||||||
{
|
{
|
||||||
printk("background_thread() running on processor %u", this_cpu());
|
printk("background_thread() running on processor %u", this_cpu());
|
||||||
while (1) {
|
|
||||||
milli_sleep(500);
|
milli_sleep(500);
|
||||||
|
|
||||||
|
while (1) {
|
||||||
printk("tock");
|
printk("tock");
|
||||||
|
milli_sleep(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +52,7 @@ void kernel_init(uintptr_t arg)
|
|||||||
create_kernel_thread(background_thread);
|
create_kernel_thread(background_thread);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
milli_sleep(1000);
|
|
||||||
printk("tick");
|
printk("tick");
|
||||||
|
milli_sleep(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user