mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-30 23:08:21 +00:00
build: switch to zonfig
This commit is contained in:
@@ -17,7 +17,7 @@ extern var AP_TRAMPOLINE_DATA: u8;
|
||||
extern var __percpu_start: u8;
|
||||
extern var __percpu_end: u8;
|
||||
|
||||
pub export var cpu_id_to_apic_id: [config.CONFIG_NCPUS]u32 = undefined;
|
||||
pub export var cpu_id_to_apic_id: [config.ncpus]u32 = undefined;
|
||||
|
||||
const start_stack = ke.ExportedCpuLocal(usize, 0, "ap_start_stack");
|
||||
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
|
||||
const config = @import("config");
|
||||
|
||||
pub const impl = if (@hasDecl(config, "CONFIG_ARCH_AMD64"))
|
||||
@import("pc/impl.zig")
|
||||
else if (@hasDecl(config, "CONFIG_ARCH_UM"))
|
||||
@import("um/impl.zig")
|
||||
else
|
||||
@compileError("unsupported architecture");
|
||||
pub const impl = switch (config.arch) {
|
||||
.amd64 => @import("pc/impl.zig"),
|
||||
.um => @import("um/impl.zig"),
|
||||
else => @compileError("unsupported architecture"),
|
||||
};
|
||||
|
||||
pub const acpi = @import("acpi/root.zig");
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#define _GNU_SOURCE 1
|
||||
#include <SDL.h>
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#include <ucontext.h>
|
||||
#include <unistd.h>
|
||||
@@ -3,12 +3,7 @@ const r = @import("root");
|
||||
pub const std_options = r.std_options;
|
||||
pub const panic = r.panic;
|
||||
|
||||
const c = @cImport({
|
||||
@cInclude("SDL.h");
|
||||
@cInclude("signal.h");
|
||||
@cInclude("pthread.h");
|
||||
});
|
||||
|
||||
const c = @import("c");
|
||||
const std = @import("std");
|
||||
const ke = r.ke;
|
||||
const pl = r.pl;
|
||||
|
||||
@@ -10,16 +10,7 @@ pub const entry = @import("entry.zig");
|
||||
|
||||
const timer = @import("timer.zig");
|
||||
|
||||
pub const c = @cImport({
|
||||
@cDefine("_GNU_SOURCE", "1");
|
||||
@cInclude("pthread.h");
|
||||
@cInclude("sys/mman.h");
|
||||
@cInclude("ucontext.h");
|
||||
@cInclude("signal.h");
|
||||
@cInclude("unistd.h");
|
||||
@cInclude("sys/time.h");
|
||||
@cInclude("sched.h");
|
||||
});
|
||||
pub const c = @import("c");
|
||||
|
||||
pub const name = "User-Mode";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user