mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 13:58:20 +00:00
meta: bump zig
This commit is contained in:
+2
-2
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user