trace: add dummy implementation of the tracing object

This commit is contained in:
2026-06-08 10:23:46 +02:00
parent 3676ceb9c4
commit 7c7ef6db6f
4 changed files with 46 additions and 4 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const Node = @import("node.zig");
const Trace = @import("trace.zig").Trace;
const Scheduler = @This();
@@ -70,6 +71,7 @@ const Task = struct {
};
gpa: Allocator,
trace: *Trace,
prng: *std.Random.DefaultPrng,
tasks: std.ArrayList(Task),
regs: Registers,
@@ -77,8 +79,9 @@ current_id: ?TaskID,
current_time: u64,
next_task_id: u64,
pub fn init(self: *Scheduler, gpa: Allocator, prng: *std.Random.DefaultPrng) void {
pub fn init(self: *Scheduler, gpa: Allocator, trace: *Trace, prng: *std.Random.DefaultPrng) void {
self.gpa = gpa;
self.trace = trace;
self.prng = prng;
self.tasks = .empty;
self.current_id = null;