This commit is contained in:
2026-02-05 00:58:38 +01:00
parent d22b96885a
commit 7d1b867c36
8 changed files with 7 additions and 67 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
#include <kernel/print.h>
#include <config.h>
const char zinnia_banner[] =
static const char zinnia_banner[] =
"zinnia " ZINNIA_VERSION " (" ZINNIA_ARCH ", " ZINNIA_COMPILER_ID ", " ZINNIA_LINKER_ID ")";
[[__init]]
+4 -4
View File
@@ -1,16 +1,14 @@
#pragma once
#include <bits/sched.h>
#include <kernel/mem.h>
#include <kernel/types.h>
#include <bits/sched.h>
#include <stddef.h>
#include <stdint.h>
ASSERT_TYPE(struct arch_context);
ASSERT_TYPE(struct arch_task_context);
typedef size_t tid_t;
enum task_state {
TASK_STATE_RUNNING, // Task is active and running.
TASK_STATE_READY, // Task is active, but not currently scheduled.
@@ -19,7 +17,7 @@ enum task_state {
// A task is the smallest unit of the scheduler.
struct task {
tid_t id;
size_t id;
struct process* process;
enum task_state state;
struct arch_context context;
@@ -29,6 +27,8 @@ struct task {
int8_t priority;
};
struct process {};
// Per-CPU data for scheduling.
struct sched_percpu {
struct task* current;
+1 -1
View File
@@ -6,7 +6,7 @@
#include <stddef.h>
#include <stdint.h>
zn_status_t syscall_dispatch(reg_t num, reg_t a0, reg_t a1, reg_t a2, reg_t a3, reg_t a4, reg_t a5, reg_t a6);
zn_status_t syscall_dispatch(reg_t num, reg_t a0, reg_t a1, reg_t a2, reg_t a3, reg_t a4, reg_t a5);
[[noreturn]]
void syscall_panic(zn_status_t err);
+1 -1
View File
@@ -4,7 +4,7 @@
#include <kernel/syscalls.h>
#include <kernel/types.h>
zn_status_t syscall_dispatch(reg_t num, reg_t a0, reg_t a1, reg_t a2, reg_t a3, reg_t a4, reg_t a5, reg_t a6) {
zn_status_t syscall_dispatch(reg_t num, reg_t a0, reg_t a1, reg_t a2, reg_t a3, reg_t a4, reg_t a5) {
switch (num) {
case ZN_SYSCALL_PANIC:
syscall_panic((zn_status_t)a0);