mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-21 18:44:01 +00:00
Stage 9
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <clks/interrupts.h>
|
||||
#include <clks/log.h>
|
||||
#include <clks/scheduler.h>
|
||||
#include <clks/service.h>
|
||||
#include <clks/syscall.h>
|
||||
#include <clks/types.h>
|
||||
|
||||
@@ -83,6 +84,14 @@ u64 clks_syscall_dispatch(void *frame_ptr) {
|
||||
struct clks_scheduler_stats stats = clks_scheduler_get_stats();
|
||||
return stats.current_task_id;
|
||||
}
|
||||
case CLKS_SYSCALL_SERVICE_COUNT:
|
||||
return clks_service_count();
|
||||
case CLKS_SYSCALL_SERVICE_READY_COUNT:
|
||||
return clks_service_ready_count();
|
||||
case CLKS_SYSCALL_CONTEXT_SWITCHES: {
|
||||
struct clks_scheduler_stats stats = clks_scheduler_get_stats();
|
||||
return stats.context_switch_count;
|
||||
}
|
||||
default:
|
||||
return (u64)-1;
|
||||
}
|
||||
@@ -99,4 +108,4 @@ u64 clks_syscall_invoke_kernel(u64 id, u64 arg0, u64 arg1, u64 arg2) {
|
||||
);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user