mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 13:58:20 +00:00
all: more 0.17 migrations
This commit is contained in:
@@ -14,7 +14,7 @@ pub const tlb_max_pages = 32;
|
||||
pub const ThreadContext = extern struct {
|
||||
sp: usize,
|
||||
ra: usize = 0,
|
||||
s: [12]usize = .{0} ** 12,
|
||||
s: [12]usize = @splat(0),
|
||||
|
||||
pub fn init_with_stack(stack: r.VAddr) @This() {
|
||||
return .{ .sp = stack };
|
||||
@@ -23,7 +23,7 @@ pub const ThreadContext = extern struct {
|
||||
pub fn reset(self: *@This(), stack_top: r.VAddr, entry: *const fn (?*anyopaque) void, arg: ?*anyopaque) @This() {
|
||||
self.sp = stack_top & ~@as(usize, 15);
|
||||
self.ra = @intFromPtr(&thread_start);
|
||||
self.s = .{0} ** 12;
|
||||
self.s = @splat(0);
|
||||
self.s[1] = @intFromPtr(entry);
|
||||
self.s[2] = @intFromPtr(arg);
|
||||
return self.*;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ const Object = struct {
|
||||
var dom: *ke.smr.Domain = undefined;
|
||||
var zone: mm.zone.Zone = undefined;
|
||||
|
||||
var slots = [_]std.atomic.Value(?*Object){.init(null)} ** nslots;
|
||||
var slots: [nslots]std.atomic.Value(?*Object) = @splat(.init(null));
|
||||
|
||||
var next_val = std.atomic.Value(u64).init(1);
|
||||
var reads = std.atomic.Value(u64).init(0);
|
||||
|
||||
@@ -28,7 +28,7 @@ const Object = struct {
|
||||
var dom: *ke.smr.Domain = undefined;
|
||||
var zone: mm.zone.Zone = undefined;
|
||||
|
||||
var slots = [_]std.atomic.Value(?*Object){.init(null)} ** nslots;
|
||||
var slots: [nslots]std.atomic.Value(?*Object) = @splat(.init(null));
|
||||
|
||||
var next_val = std.atomic.Value(u64).init(1);
|
||||
var reads = std.atomic.Value(u64).init(0);
|
||||
|
||||
Reference in New Issue
Block a user