simulator: Add PRNG field

This commit is contained in:
2026-06-08 10:11:00 +02:00
parent 92f301ea40
commit bad44c36f1
13 changed files with 18 additions and 14 deletions
+3 -1
View File
@@ -70,14 +70,16 @@ const Task = struct {
};
gpa: Allocator,
prng: *std.Random.DefaultPrng,
tasks: std.ArrayList(Task),
regs: Registers,
current_id: ?TaskID,
current_time: u64,
next_task_id: u64,
pub fn init(self: *Scheduler, gpa: Allocator) void {
pub fn init(self: *Scheduler, gpa: Allocator, prng: *std.Random.DefaultPrng) void {
self.gpa = gpa;
self.prng = prng;
self.tasks = .empty;
self.current_id = null;
self.current_time = 0;