feat: fireworks!

This commit is contained in:
Loïc Grégoire
2026-04-18 20:44:52 -04:00
parent 712a8012af
commit 8fc133cc3c
18 changed files with 186 additions and 127 deletions
+7
View File
@@ -38,6 +38,7 @@ pub const GlobalState = struct {
pub const CpuState = struct {
pthread: c.pthread_t,
td: *ke.Thread,
};
pub var global_state: GlobalState = undefined;
@@ -122,6 +123,8 @@ fn other_cpu_entry(_: ?*anyopaque) callconv(.c) ?*anyopaque {
ki.cpu.init_cpu(@intCast(my_cpu_id));
ki.sched.percpu.local().current_thread = percpu.local().td;
timer.init_cpu();
while (true) {}
@@ -174,6 +177,10 @@ pub fn late_init(_: *pl.BootInfo) linksection(r.init) void {
@memcpy(block, @as([*]u8, @ptrCast(&__percpu_start))[0..size]);
const td = allocator.create(ke.Thread) catch @panic("oom");
make_thread(idle, td);
percpu.remote(@intCast(i)).td = td;
var attr: c.pthread_attr_t = undefined;
_ = c.pthread_attr_init(&attr);