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
-3
View File
@@ -11,6 +11,3 @@ compile_commands.json
# Default build dir
build/
# Generated files
.config*
-2
View File
@@ -13,8 +13,6 @@ zinnia is a lightweight Unix-like microkernel targeting 64-bit devices.
> Please note that this project is a work in progress.
> Some parts may not work at all and/or will drastically change over time.
## Building
> [!NOTE]
+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);
-6
View File
@@ -1,6 +0,0 @@
option(
'kernel_only',
type: 'boolean',
value: true,
description: 'Build only the kernel',
)
-49
View File
@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 4096 4096" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Layer1" transform="matrix(0.927723,0,0,0.927723,148.023,148.022)">
<g transform="matrix(1.07791,0,0,1.07791,-159.555,-159.554)">
<rect x="-40.713" y="-42.6" width="4147.51" height="4154.94" style="fill:rgb(255,26,0);"/>
</g>
<g transform="matrix(0.875945,0,0,0.881863,277.69,267.064)">
<rect x="-193.963" y="-180.613" width="4429.98" height="4400.24" style="fill:rgb(27,3,0);"/>
</g>
</g>
<g transform="matrix(0.879229,0,0,0.879229,247.028,247.028)">
<g>
<g transform="matrix(0.707107,-0.707106,0.707283,0.707282,-936.782,381.723)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.61px;"/>
</g>
<g transform="matrix(0.965926,-0.258819,0.258884,0.966165,-1002.14,-137.809)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.61px;"/>
</g>
<g transform="matrix(0.258819,-0.965926,0.966166,0.258883,-620.415,798.973)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.61px;"/>
</g>
</g>
<g transform="matrix(1.59934,0,0,1.59934,-3302.65,-3289.58)">
<path d="M3276.29,2056.83L3680.06,2056.83C3680.06,2056.85 3680.06,2056.87 3680.06,2056.89C3680.06,2948.27 2956.37,3671.96 2064.99,3671.96L2064.99,3268.19C2733.52,3268.19 3276.29,2725.43 3276.29,2056.89C3276.29,2056.87 3276.29,2056.85 3276.29,2056.83Z" style="fill:rgb(255,26,0);"/>
</g>
</g>
<g transform="matrix(0.761146,-0.439447,0.439557,0.761334,1609.26,1609.23)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.83px;"/>
</g>
<g transform="matrix(0.439448,-0.761146,0.761335,0.439556,789.817,3028.53)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.83px;"/>
</g>
<g transform="matrix(3.56811e-07,-0.878895,0.879113,-3.55761e-07,789.807,4667.39)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.83px;"/>
</g>
<g transform="matrix(0.878895,3.56811e-07,3.55761e-07,0.879113,3028.56,789.807)">
<path d="M932.324,392.388L932.323,3478.7" style="fill:none;stroke:rgb(255,26,0);stroke-width:568.83px;"/>
</g>
<g transform="matrix(1.40566,0,0,1.40565,-2654.67,-2643.18)">
<path d="M2064.99,3312.46L2064.99,2056.83L3320.56,2056.83C3320.56,2056.85 3320.56,2056.87 3320.56,2056.89C3320.56,2749.86 2757.96,3312.46 2064.99,3312.46Z" style="fill:rgb(104,10,0);"/>
</g>
<g transform="matrix(-1.40564,-1.72141e-16,1.72141e-16,-1.40564,6750.61,6739.14)">
<path d="M2064.99,3312.46L2064.99,2056.83L3320.56,2056.83C3320.56,2056.85 3320.56,2056.87 3320.56,2056.89C3320.56,2749.86 2757.96,3312.46 2064.99,3312.46Z" style="fill:rgb(104,10,0);"/>
</g>
<g transform="matrix(-1.40564,-1.72141e-16,1.72141e-16,-1.40564,6750.61,6739.14)">
<path d="M3276.29,2056.83L3680.06,2056.83C3680.06,2056.85 3680.06,2056.87 3680.06,2056.89C3680.06,2948.27 2956.37,3671.96 2064.99,3671.96L2064.99,3268.19C2733.52,3268.19 3276.29,2725.43 3276.29,2056.89C3276.29,2056.87 3276.29,2056.85 3276.29,2056.83Z" style="fill:rgb(255,26,0);"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB