pluto/test/mock/kernel/panic_mock.zig

14 lines
467 B
Zig
Raw Normal View History

const builtin = @import("builtin");
const std = @import("std");
2019-11-02 03:18:02 +01:00
const MemProfile = @import("mem_mock.zig").MemProfile;
2020-01-01 20:12:36 +01:00
pub fn panic(trace: ?*builtin.StackTrace, comptime format: []const u8, args: var) noreturn {
@setCold(true);
std.debug.panic(format, args);
}
2019-11-02 03:18:02 +01:00
pub fn init(mem_profile: *const MemProfile, allocator: *std.mem.Allocator) !void {
// This is never run so just return an arbitrary error to satisfy the compiler
return error.NotNeeded;
}