mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-30 06:48:22 +00:00
feat: use per-cpu sections
This commit is contained in:
+2
-1
@@ -53,12 +53,13 @@ pub const wait = struct {
|
||||
};
|
||||
|
||||
pub const Cpu = p.cpu.Cpu;
|
||||
pub const CpuLocal = p.cpu.CpuLocal;
|
||||
|
||||
comptime {
|
||||
if (!@hasDecl(p.impl, "curcpu")) @compileError("impl must provide curcpu()");
|
||||
}
|
||||
|
||||
/// Returns the current CPU
|
||||
/// Return the current CPU
|
||||
pub const curcpu: fn () *Cpu = p.impl.curcpu;
|
||||
|
||||
/// Number of CPUs on the system
|
||||
|
||||
Reference in New Issue
Block a user