meta: bump zig

This commit is contained in:
Loïc Grégoire
2026-10-26 14:40:49 -04:00
parent 6020484453
commit bdb3f08652
6 changed files with 9 additions and 8 deletions
+2 -2
View File
@@ -13,8 +13,8 @@
.hash = "N-V-__8AAAAAjAwsopZIlbp4U6NN1Eh573uVdLTwl1mkFUug",
},
.zonfig = .{
.url = "git+https://github.com/rdmsr/zonfig?ref=HEAD#f2c9ab81c83750282ac4e4396a7537c6ecd0f7c2",
.hash = "zonfig-0.1.0-V0D8-ShLFACPRzB4c6AWjKwXlEdwxn-f6zt8eJKVwq_t",
.url = "git+https://github.com/rdmsr/zonfig?ref=HEAD#f353ad971985fb40d555401ebcee3fcbb057b490",
.hash = "zonfig-0.1.0-V0D8-SpLFABAqN9VkZ5tueJJ6d59ukdkpTJkonBWEZ1U",
},
},
+1 -1
View File
@@ -69,7 +69,7 @@ pub const PVClockSource = struct {
else
tsc_delta >> @intCast(-tsc_shift);
const ns = self.page.system_time +
(shifted * @as(u128, self.page.tsc_to_system_mul) >> 32);
((shifted * @as(u128, self.page.tsc_to_system_mul)) >> 32);
if (@atomicLoad(u32, &self.page.version, .acquire) == ver)
return @as(u64, @truncate(ns)) - self.time_at_boot;
+2 -2
View File
@@ -125,7 +125,7 @@ pub inline fn rdmsr(msr: u32) u64 {
[high] "={edx}" (high),
: [msr] "{ecx}" (msr),
);
return @as(u64, high) << 32 | low;
return (@as(u64, high) << 32) | low;
}
pub inline fn wrmsr(msr: u32, value: u64) void {
@@ -234,7 +234,7 @@ pub inline fn rdtsc() u64 {
: [low] "={eax}" (low),
[high] "={edx}" (high),
);
return @as(u64, high) << 32 | low;
return (@as(u64, high) << 32) | low;
}
pub const Cr0 = packed struct(u64) {
+2 -2
View File
@@ -292,8 +292,8 @@ pub fn init() void {
// Figure out the memory layout.
// NOTE: This assumes 64-bit (fix this when we port to 32-bit).
// Higher half starts here, we give 1/2 to the kernel for its direct map.
const higher_half_start: usize = @bitCast(-@as(isize, 1) << vbits - 1);
const kernel_heap = higher_half_start + (@as(usize, 1) << vbits - 2);
const higher_half_start: usize = @bitCast(-@as(isize, 1) << (vbits - 1));
const kernel_heap = higher_half_start + (@as(usize, 1) << (vbits - 2));
// Then, we give 16 TiB to the kernel heap.
const pfndb = kernel_heap + 0x100000000000;
+1 -1
View File
@@ -232,7 +232,7 @@ fn update_prio(td: *ke.Thread) void {
/// `to.lock` and the owning turnstile's lock.
fn donate_to(boost: *Boost, to: *ke.Thread, pri: u8) void {
// A lend only ever raises.
if (boost.donated != null and pri <= boost.donated orelse unreachable)
if (boost.donated != null and pri <= boost.donated.?)
return;
if (boost.donated == null) to.turnstiles_owned.insert_head(&boost.link);
+1
View File
@@ -984,6 +984,7 @@ pub const Zone = struct {
fn slab_free(self: *Zone, obj: *anyopaque, poison: bool) void {
if (!is_poison_enabled or poison and !self.flags.dont_touch) {
if (!is_poison_enabled or (poison and !self.flags.dont_touch)) {
if (self.dtor) |dtor| {
dtor(obj);
}