const r = @import("root"); const ke = r.ke; const kep = ke.private; const mm = r.mm; pub const thread = @import("thread.zig"); pub var turnstile_zone: mm.zone.TypedZone(kep.turnstile.Turnstile) = undefined; fn turnstile_ctor(ts: *kep.turnstile.Turnstile) void { ts.* = .{ .link = undefined, .next_free = null, .obj = undefined, .queues = undefined, .waiters = 0, .owners = .none, .lock = .init(), }; ts.reset(); } /// Initialize the process subsystem. pub fn init() void { turnstile_zone.init("turnstiles", .{ .ctor = turnstile_ctor }); thread.init(); }