diff options
Diffstat (limited to 'arch/riscv64/conf')
| -rwxr-xr-x | arch/riscv64/conf/init | bin | 2560 -> 2664 bytes | |||
| -rw-r--r-- | arch/riscv64/conf/init.c | 11 | ||||
| -rw-r--r-- | arch/riscv64/conf/initrd | bin | 3072 -> 3072 bytes |
3 files changed, 8 insertions, 3 deletions
diff --git a/arch/riscv64/conf/init b/arch/riscv64/conf/init Binary files differindex 47e733f..11d838c 100755 --- a/arch/riscv64/conf/init +++ b/arch/riscv64/conf/init diff --git a/arch/riscv64/conf/init.c b/arch/riscv64/conf/init.c index 1886760..45274d9 100644 --- a/arch/riscv64/conf/init.c +++ b/arch/riscv64/conf/init.c @@ -133,10 +133,15 @@ void _start() if (pid != 0) { print_value("Child pid: ", pid); puts("Swapping to child...\n"); - sys_swap(pid); - puts("We shouldn't be here?\n"); - while(1); + while(1) sys_swap(pid); } puts("Hello from child!\n"); + + puts("Doing 1M swaps...\n"); + start = sys_ticks(); + for (long i = 0; i < 1000000; ++i) + sys_swap(1); + uint64_t ticks = sys_ticks() - start; + print_value("1M swaps took ", ticks / second); } diff --git a/arch/riscv64/conf/initrd b/arch/riscv64/conf/initrd Binary files differindex 24f9fb4..5c0c9bb 100644 --- a/arch/riscv64/conf/initrd +++ b/arch/riscv64/conf/initrd |
