Initial scheduler
Fix TSS Also change to .{} syntax where appropriate. Added the SS segment Fixed spelling Refactoring GDT Multitasking working for now WIP scheduler Refactored Bitmap a bit WIP still Task switching working Handlers return the stack pointer that will be used to restore the tasks stack, normal handlers will return the same stack pointer it was called with where task switching will return the stack pointer of the next task and restore its state using the interrupt stub. Initial scheduler done Created a stage 2 init task Change u32 to usize Move Task to arch specific WIP WIP2 Removed esp from task, replaced with stack_pointer Removed the debug logs Fixed init task stack Change pickNextTask to pointer manipulation This allows less allocations so faster switching Temporary enable interrupts for some runtime tests PIT and RTC need interrupts enabled to run their runtime tests Renamed schedule => pickNextTask, comptime bitmap for pids not task init And some other stuff: No pub for the task anymore Use the leak detector allocator Fmt Fix unit tests And some other stuff :P PR review Moved Task out of arch and have the stack init in the arch file Mocking clean up Removed commented code Renamed createTask to scheduleTask where the user will have to provide a task to schedule Removed redundant pub in log runtime test Removed global allocator for scheduler Cleaner assembly in paging Fmt Added new Scheduler test mode Added new test mode to CI Removed one of the prints Added doc comment, task test for i386 Removed test WIP Runtime tests work Have a global set in one task and reacted to in another. Also test that local variables are preserved after a task switch. Removed new lines Increased line length Move the allocation of the bool above the task creation
This commit is contained in:
parent
20826548e8
commit
d600be874c
30 changed files with 1127 additions and 395 deletions
|
@ -1,4 +1,5 @@
|
|||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const StringHashMap = std.StringHashMap;
|
||||
const expect = std.testing.expect;
|
||||
const expectEqual = std.testing.expectEqual;
|
||||
|
@ -8,6 +9,7 @@ const warn = std.debug.warn;
|
|||
const gdt = @import("gdt_mock.zig");
|
||||
const idt = @import("idt_mock.zig");
|
||||
const cmos = @import("cmos_mock.zig");
|
||||
const task = @import("task_mock.zig");
|
||||
|
||||
///
|
||||
/// The enumeration of types that the mocking framework supports. These include basic types like u8
|
||||
|
@ -19,13 +21,18 @@ const DataElementType = enum {
|
|||
U8,
|
||||
U16,
|
||||
U32,
|
||||
ECmosStatusRegister,
|
||||
ECmosRtcRegister,
|
||||
PTR_CONST_GdtPtr,
|
||||
PTR_CONST_IdtPtr,
|
||||
GdtPtr,
|
||||
IdtPtr,
|
||||
USIZE,
|
||||
PTR_ALLOCATOR,
|
||||
ECMOSSTATUSREGISTER,
|
||||
ECMOSRTCREGISTER,
|
||||
GDTPTR,
|
||||
IDTPTR,
|
||||
IDTENTRY,
|
||||
PTR_CONST_GDTPTR,
|
||||
PTR_CONST_IDTPTR,
|
||||
ERROR_IDTERROR_VOID,
|
||||
ERROR_MEM_PTRTASK,
|
||||
PTR_TASK,
|
||||
EFN_OVOID,
|
||||
NFN_OVOID,
|
||||
FN_OVOID,
|
||||
|
@ -34,20 +41,26 @@ const DataElementType = enum {
|
|||
FN_IU8_OBOOL,
|
||||
FN_IU8_OVOID,
|
||||
FN_IU16_OVOID,
|
||||
FN_IUSIZE_OVOID,
|
||||
FN_IU16_OU8,
|
||||
FN_IU4_IU4_OU8,
|
||||
FN_IU8_IU8_OU16,
|
||||
FN_IU16_IU8_OVOID,
|
||||
FN_IU16_IU16_OVOID,
|
||||
FN_IECmosStatusRegister_IBOOL_OU8,
|
||||
FN_IECmosStatusRegister_IU8_IBOOL_OVOID,
|
||||
FN_IECmosRtcRegister_OU8,
|
||||
FN_IECMOSSTATUSREGISTER_IBOOL_OU8,
|
||||
FN_IECMOSSTATUSREGISTER_IU8_IBOOL_OVOID,
|
||||
FN_IECMOSRTCREGISTER_OU8,
|
||||
FN_IU8_IEFNOVOID_OERRORIDTERRORVOID,
|
||||
FN_IU8_INFNOVOID_OERRORIDTERRORVOID,
|
||||
FN_IPTRCONSTGDTPTR_OVOID,
|
||||
FN_IPTRCONSTIDTPTR_OVOID,
|
||||
FN_OGDTPTR,
|
||||
FN_OIDTPTR,
|
||||
FN_IIDTENTRY_OBOOL,
|
||||
FN_IPTRTask_IUSIZE_OVOID,
|
||||
FN_IPTRTASK_IPTRALLOCATOR_OVOID,
|
||||
FN_IFNOVOID_OMEMERRORPTRTASK,
|
||||
FN_IFNOVOID_IPTRALLOCATOR_OMEMERRORPTRTASK,
|
||||
};
|
||||
|
||||
///
|
||||
|
@ -64,13 +77,18 @@ const DataElement = union(DataElementType) {
|
|||
U8: u8,
|
||||
U16: u16,
|
||||
U32: u32,
|
||||
ECmosStatusRegister: cmos.StatusRegister,
|
||||
ECmosRtcRegister: cmos.RtcRegister,
|
||||
PTR_CONST_GdtPtr: *const gdt.GdtPtr,
|
||||
IdtPtr: idt.IdtPtr,
|
||||
GdtPtr: gdt.GdtPtr,
|
||||
PTR_CONST_IdtPtr: *const idt.IdtPtr,
|
||||
USIZE: usize,
|
||||
PTR_ALLOCATOR: *std.mem.Allocator,
|
||||
ECMOSSTATUSREGISTER: cmos.StatusRegister,
|
||||
ECMOSRTCREGISTER: cmos.RtcRegister,
|
||||
GDTPTR: gdt.GdtPtr,
|
||||
IDTPTR: idt.IdtPtr,
|
||||
IDTENTRY: idt.IdtEntry,
|
||||
PTR_CONST_GDTPTR: *const gdt.GdtPtr,
|
||||
PTR_CONST_IDTPTR: *const idt.IdtPtr,
|
||||
ERROR_IDTERROR_VOID: idt.IdtError!void,
|
||||
ERROR_MEM_PTRTASK: std.mem.Allocator.Error!*task.Task,
|
||||
PTR_TASK: *task.Task,
|
||||
EFN_OVOID: fn () callconv(.C) void,
|
||||
NFN_OVOID: fn () callconv(.Naked) void,
|
||||
FN_OVOID: fn () void,
|
||||
|
@ -78,21 +96,27 @@ const DataElement = union(DataElementType) {
|
|||
FN_OU16: fn () u16,
|
||||
FN_IU8_OBOOL: fn (u8) bool,
|
||||
FN_IU8_OVOID: fn (u8) void,
|
||||
FN_IUSIZE_OVOID: fn (usize) void,
|
||||
FN_IU16_OVOID: fn (u16) void,
|
||||
FN_IU16_OU8: fn (u16) u8,
|
||||
FN_IU4_IU4_OU8: fn (u4, u4) u8,
|
||||
FN_IU8_IU8_OU16: fn (u8, u8) u16,
|
||||
FN_IU16_IU8_OVOID: fn (u16, u8) void,
|
||||
FN_IU16_IU16_OVOID: fn (u16, u16) void,
|
||||
FN_IECmosStatusRegister_IBOOL_OU8: fn (cmos.StatusRegister, bool) u8,
|
||||
FN_IECmosStatusRegister_IU8_IBOOL_OVOID: fn (cmos.StatusRegister, u8, bool) void,
|
||||
FN_IECmosRtcRegister_OU8: fn (cmos.RtcRegister) u8,
|
||||
FN_IECMOSSTATUSREGISTER_IBOOL_OU8: fn (cmos.StatusRegister, bool) u8,
|
||||
FN_IECMOSSTATUSREGISTER_IU8_IBOOL_OVOID: fn (cmos.StatusRegister, u8, bool) void,
|
||||
FN_IECMOSRTCREGISTER_OU8: fn (cmos.RtcRegister) u8,
|
||||
FN_IU8_IEFNOVOID_OERRORIDTERRORVOID: fn (u8, fn () callconv(.C) void) idt.IdtError!void,
|
||||
FN_IU8_INFNOVOID_OERRORIDTERRORVOID: fn (u8, fn () callconv(.Naked) void) idt.IdtError!void,
|
||||
FN_IPTRCONSTGDTPTR_OVOID: fn (*const gdt.GdtPtr) void,
|
||||
FN_IPTRCONSTIDTPTR_OVOID: fn (*const idt.IdtPtr) void,
|
||||
FN_OGDTPTR: fn () gdt.GdtPtr,
|
||||
FN_OIDTPTR: fn () idt.IdtPtr,
|
||||
FN_IIDTENTRY_OBOOL: fn (idt.IdtEntry) bool,
|
||||
FN_IPTRTask_IUSIZE_OVOID: fn (*task.Task, usize) void,
|
||||
FN_IPTRTASK_IPTRALLOCATOR_OVOID: fn (*task.Task, *std.mem.Allocator) void,
|
||||
FN_IFNOVOID_OMEMERRORPTRTASK: fn (fn () void) std.mem.Allocator.Error!*task.Task,
|
||||
FN_IFNOVOID_IPTRALLOCATOR_OMEMERRORPTRTASK: fn (fn () void, *std.mem.Allocator) std.mem.Allocator.Error!*task.Task,
|
||||
};
|
||||
|
||||
///
|
||||
|
@ -173,11 +197,18 @@ fn Mock() type {
|
|||
u8 => DataElement{ .U8 = arg },
|
||||
u16 => DataElement{ .U16 = arg },
|
||||
u32 => DataElement{ .U32 = arg },
|
||||
cmos.StatusRegister => DataElement{ .ECmosStatusRegister = arg },
|
||||
cmos.RtcRegister => DataElement{ .ECmosRtcRegister = arg },
|
||||
*const gdt.GdtPtr => DataElement{ .PTR_CONST_GdtPtr = arg },
|
||||
*const idt.IdtPtr => DataElement{ .PTR_CONST_IdtPtr = arg },
|
||||
usize => DataElement{ .USIZE = arg },
|
||||
*std.mem.Allocator => DataElement{ .PTR_ALLOCATOR = arg },
|
||||
cmos.StatusRegister => DataElement{ .ECMOSSTATUSREGISTER = arg },
|
||||
cmos.RtcRegister => DataElement{ .ECMOSRTCREGISTER = arg },
|
||||
gdt.GdtPtr => DataElement{ .GDTPTR = arg },
|
||||
idt.IdtPtr => DataElement{ .IDTPTR = arg },
|
||||
idt.IdtEntry => DataElement{ .IDTENTRY = arg },
|
||||
*const gdt.GdtPtr => DataElement{ .PTR_CONST_GDTPTR = arg },
|
||||
*const idt.IdtPtr => DataElement{ .PTR_CONST_IDTPTR = arg },
|
||||
idt.IdtError!void => DataElement{ .ERROR_IDTERROR_VOID = arg },
|
||||
std.mem.Allocator.Error!*task.Task => DataElement{ .ERROR_MEM_PTRTASK = arg },
|
||||
*task.Task => DataElement{ .PTR_TASK = arg },
|
||||
fn () callconv(.C) void => DataElement{ .EFN_OVOID = arg },
|
||||
fn () callconv(.Naked) void => DataElement{ .NFN_OVOID = arg },
|
||||
fn () void => DataElement{ .FN_OVOID = arg },
|
||||
|
@ -185,19 +216,27 @@ fn Mock() type {
|
|||
fn () u16 => DataElement{ .FN_OU16 = arg },
|
||||
fn (u8) bool => DataElement{ .FN_IU8_OBOOL = arg },
|
||||
fn (u8) void => DataElement{ .FN_IU8_OVOID = arg },
|
||||
fn (usize) void => DataElement{ .FN_IUSIZE_OVOID = arg },
|
||||
fn (u16) void => DataElement{ .FN_IU16_OVOID = arg },
|
||||
fn (u16) u8 => DataElement{ .FN_IU16_OU8 = arg },
|
||||
fn (u4, u4) u8 => DataElement{ .FN_IU4_IU4_OU8 = arg },
|
||||
fn (u8, u8) u16 => DataElement{ .FN_IU8_IU8_OU16 = arg },
|
||||
fn (u16, u8) void => DataElement{ .FN_IU16_IU8_OVOID = arg },
|
||||
fn (u16, u16) void => DataElement{ .FN_IU16_IU16_OVOID = arg },
|
||||
fn (cmos.StatusRegister, bool) u8 => DataElement{ .FN_IECmosStatusRegister_IBOOL_OU8 = arg },
|
||||
fn (cmos.StatusRegister, u8, bool) void => DataElement{ .FN_IECmosStatusRegister_IU8_IBOOL_OVOID = arg },
|
||||
fn (cmos.RtcRegister) u8 => DataElement{ .FN_IECmosRtcRegister_OU8 = arg },
|
||||
fn (cmos.StatusRegister, bool) u8 => DataElement{ .FN_IECMOSSTATUSREGISTER_IBOOL_OU8 = arg },
|
||||
fn (cmos.StatusRegister, u8, bool) void => DataElement{ .FN_IECMOSSTATUSREGISTER_IU8_IBOOL_OVOID = arg },
|
||||
fn (cmos.RtcRegister) u8 => DataElement{ .FN_IECMOSRTCREGISTER_OU8 = arg },
|
||||
fn (*const gdt.GdtPtr) void => DataElement{ .FN_IPTRCONSTGDTPTR_OVOID = arg },
|
||||
fn () gdt.GdtPtr => DataElement{ .FN_OGDTPTR = arg },
|
||||
fn (*const idt.IdtPtr) void => DataElement{ .FN_IPTRCONSTIDTPTR_OVOID = arg },
|
||||
fn () idt.IdtPtr => DataElement{ .FN_OIDTPTR = arg },
|
||||
fn (u8, fn () callconv(.C) void) idt.IdtError!void => DataElement{ .FN_IU8_IEFNOVOID_OERRORIDTERRORVOID = arg },
|
||||
fn (u8, fn () callconv(.Naked) void) idt.IdtError!void => DataElement{ .FN_IU8_INFNOVOID_OERRORIDTERRORVOID = arg },
|
||||
fn (idt.IdtEntry) bool => DataElement{ .FN_IIDTENTRY_OBOOL = arg },
|
||||
fn (*task.Task, usize) void => DataElement{ .FN_IPTRTask_IUSIZE_OVOID = arg },
|
||||
fn (*task.Task, *std.mem.Allocator) void => DataElement{ .FN_IPTRTASK_IPTRALLOCATOR_OVOID = arg },
|
||||
fn (fn () void) std.mem.Allocator.Error!*task.Task => DataElement{ .FN_IFNOVOID_OMEMERRORPTRTASK = arg },
|
||||
fn (fn () void, *std.mem.Allocator) std.mem.Allocator.Error!*task.Task => DataElement{ .FN_IFNOVOID_IPTRALLOCATOR_OMEMERRORPTRTASK = arg },
|
||||
else => @compileError("Type not supported: " ++ @typeName(@TypeOf(arg))),
|
||||
};
|
||||
}
|
||||
|
@ -218,34 +257,46 @@ fn Mock() type {
|
|||
u8 => DataElementType.U8,
|
||||
u16 => DataElementType.U16,
|
||||
u32 => DataElementType.U32,
|
||||
cmos.StatusRegister => DataElementType.ECmosStatusRegister,
|
||||
cmos.RtcRegister => DataElementType.ECmosRtcRegister,
|
||||
*const gdt.GdtPtr => DataElement.PTR_CONST_GdtPtr,
|
||||
*const idt.IdtPtr => DataElement.PTR_CONST_IdtPtr,
|
||||
gdt.GdtPtr => DataElement.GdtPtr,
|
||||
idt.IdtPtr => DataElement.IdtPtr,
|
||||
idt.IdtError!void => DataElement.ERROR_IDTERROR_VOID,
|
||||
usize => DataElementType.USIZE,
|
||||
*std.mem.Allocator => DataElementType.PTR_ALLOCATOR,
|
||||
cmos.StatusRegister => DataElementType.ECMOSSTATUSREGISTER,
|
||||
cmos.RtcRegister => DataElementType.ECMOSRTCREGISTER,
|
||||
gdt.GdtPtr => DataElementType.GDTPTR,
|
||||
idt.IdtPtr => DataElementType.IDTPTR,
|
||||
idt.IdtEntry => DataElementType.IDTENTRY,
|
||||
*const gdt.GdtPtr => DataElementType.PTR_CONST_GDTPTR,
|
||||
*const idt.IdtPtr => DataElementType.PTR_CONST_IDTPTR,
|
||||
idt.IdtError!void => DataElementType.ERROR_IDTERROR_VOID,
|
||||
std.mem.Allocator.Error!*task.Task => DataElementType.ERROR_MEM_PTRTASK,
|
||||
*task.Task => DataElementType.PTR_TASK,
|
||||
fn () callconv(.C) void => DataElementType.EFN_OVOID,
|
||||
fn () callconv(.Naked) void => DataElementType.NFN_OVOID,
|
||||
fn () void => DataElementType.FN_OVOID,
|
||||
fn () usize => DataElementType.FN_OUSIZE,
|
||||
fn () u16 => DataElementType.FN_OU16,
|
||||
fn (u8) bool => DataElementType.FN_IU8_OBOOL,
|
||||
fn (u8) void => DataElementType.FN_IU8_OVOID,
|
||||
fn (u16) void => DataElementType.FN_IU16_OVOID,
|
||||
fn (usize) void => DataElementType.FN_IUSIZE_OVOID,
|
||||
fn (u16) u8 => DataElementType.FN_IU16_OU8,
|
||||
fn (u4, u4) u8 => DataElementType.FN_IU4_IU4_OU8,
|
||||
fn (u8, u8) u16 => DataElementType.FN_IU8_IU8_OU16,
|
||||
fn (u16, u8) void => DataElementType.FN_IU16_IU8_OVOID,
|
||||
fn (u16, u16) void => DataElementType.FN_IU16_IU16_OVOID,
|
||||
fn (cmos.StatusRegister, bool) u8 => DataElementType.FN_IECmosStatusRegister_IBOOL_OU8,
|
||||
fn (cmos.StatusRegister, u8, bool) void => DataElementType.FN_IECmosStatusRegister_IU8_IBOOL_OVOID,
|
||||
fn (cmos.RtcRegister) u8 => DataElementType.FN_IECmosRtcRegister_OU8,
|
||||
fn (cmos.StatusRegister, bool) u8 => DataElementType.FN_IECMOSSTATUSREGISTER_IBOOL_OU8,
|
||||
fn (cmos.StatusRegister, u8, bool) void => DataElementType.FN_IECMOSSTATUSREGISTER_IU8_IBOOL_OVOID,
|
||||
fn (cmos.RtcRegister) u8 => DataElementType.FN_IECMOSRTCREGISTER_OU8,
|
||||
fn (*const gdt.GdtPtr) void => DataElementType.FN_IPTRCONSTGDTPTR_OVOID,
|
||||
fn (*const idt.IdtPtr) void => DataElementType.FN_IPTRCONSTIDTPTR_OVOID,
|
||||
fn () gdt.GdtPtr => DataElementType.FN_OGDTPTR,
|
||||
fn () idt.IdtPtr => DataElementType.FN_OIDTPTR,
|
||||
fn (u8, fn () callconv(.C) void) idt.IdtError!void => DataElementType.FN_IU8_IEFNOVOID_OERRORIDTERRORVOID,
|
||||
fn (u8, fn () callconv(.Naked) void) idt.IdtError!void => DataElementType.FN_IU8_INFNOVOID_OERRORIDTERRORVOID,
|
||||
fn (idt.IdtEntry) bool => DataElementType.FN_IIDTENTRY_OBOOL,
|
||||
fn (*task.Task, usize) void => DataElementType.FN_IPTRTask_IUSIZE_OVOID,
|
||||
fn (*task.Task, *std.mem.Allocator) void => DataElementType.FN_IPTRTASK_IPTRALLOCATOR_OVOID,
|
||||
fn (fn () void) std.mem.Allocator.Error!*task.Task => DataElementType.FN_IFNOVOID_OMEMERRORPTRTASK,
|
||||
fn (fn () void, *std.mem.Allocator) std.mem.Allocator.Error!*task.Task => DataElementType.FN_IFNOVOID_IPTRALLOCATOR_OMEMERRORPTRTASK,
|
||||
else => @compileError("Type not supported: " ++ @typeName(T)),
|
||||
};
|
||||
}
|
||||
|
@ -268,34 +319,46 @@ fn Mock() type {
|
|||
u8 => element.U8,
|
||||
u16 => element.U16,
|
||||
u32 => element.U32,
|
||||
cmos.StatusRegister => element.ECmosStatusRegister,
|
||||
cmos.RtcRegister => element.ECmosRtcRegister,
|
||||
*const gdt.GdtPtr => element.PTR_CONST_GdtPtr,
|
||||
*const idt.IdtPtr => element.PTR_CONST_IdtPtr,
|
||||
gdt.GdtPtr => element.GdtPtr,
|
||||
idt.IdtPtr => element.IdtPtr,
|
||||
usize => element.USIZE,
|
||||
*std.mem.Allocator => element.PTR_ALLOCATOR,
|
||||
cmos.StatusRegister => element.ECMOSSTATUSREGISTER,
|
||||
gdt.GdtPtr => element.GDTPTR,
|
||||
idt.IdtPtr => element.IDTPTR,
|
||||
idt.IdtEntry => element.IDTENTRY,
|
||||
cmos.RtcRegister => element.ECMOSRTCREGISTER,
|
||||
*const gdt.GdtPtr => element.PTR_CONST_GDTPTR,
|
||||
*const idt.IdtPtr => element.PTR_CONST_IDTPTR,
|
||||
idt.IdtError!void => element.ERROR_IDTERROR_VOID,
|
||||
std.mem.Allocator.Error!*task.Task => element.ERROR_MEM_PTRTASK,
|
||||
*task.Task => element.PTR_TASK,
|
||||
fn () callconv(.C) void => element.EFN_OVOID,
|
||||
fn () callconv(.Naked) void => element.NFN_OVOID,
|
||||
fn () void => element.FN_OVOID,
|
||||
fn () usize => element.FN_OUSIZE,
|
||||
fn () u16 => element.FN_OU16,
|
||||
fn (u8) bool => element.FN_IU8_OBOOL,
|
||||
fn (u8) void => element.FN_IU8_OVOID,
|
||||
fn (u16) void => element.FN_IU16_OVOID,
|
||||
fn (usize) void => element.FN_IUSIZE_OVOID,
|
||||
fn (u16) u8 => element.FN_IU16_OU8,
|
||||
fn (u4, u4) u8 => element.FN_IU4_IU4_OU8,
|
||||
fn (u8, u8) u16 => element.FN_IU8_IU8_OU16,
|
||||
fn (u16, u8) void => element.FN_IU16_IU8_OVOID,
|
||||
fn (u16, u16) void => element.FN_IU16_IU16_OVOID,
|
||||
fn (cmos.StatusRegister, bool) u8 => element.FN_IECmosStatusRegister_IBOOL_OU8,
|
||||
fn (cmos.StatusRegister, u8, bool) void => element.FN_IECmosStatusRegister_IU8_IBOOL_OVOID,
|
||||
fn (cmos.RtcRegister) u8 => element.FN_IECmosRtcRegister_OU8,
|
||||
fn (cmos.StatusRegister, bool) u8 => element.FN_IECMOSSTATUSREGISTER_IBOOL_OU8,
|
||||
fn (cmos.StatusRegister, u8, bool) void => element.FN_IECMOSSTATUSREGISTER_IU8_IBOOL_OVOID,
|
||||
fn (cmos.RtcRegister) u8 => element.FN_IECMOSRTCREGISTER_OU8,
|
||||
fn (*const gdt.GdtPtr) void => element.FN_IPTRCONSTGDTPTR_OVOID,
|
||||
fn (*const idt.IdtPtr) void => element.FN_IPTRCONSTIDTPTR_OVOID,
|
||||
fn (u8, fn () callconv(.C) void) idt.IdtError!void => element.FN_IU8_IEFNOVOID_OERRORIDTERRORVOID,
|
||||
fn (u8, fn () callconv(.Naked) void) idt.IdtError!void => element.FN_IU8_INFNOVOID_OERRORIDTERRORVOID,
|
||||
fn () gdt.GdtPtr => element.FN_OGDTPTR,
|
||||
fn () idt.IdtPtr => element.FN_OIDTPTR,
|
||||
fn (idt.IdtEntry) bool => element.FN_IIDTENTRY_OBOOL,
|
||||
fn (*task.Task, usize) void => element.FN_IPTRTask_IUSIZE_OVOID,
|
||||
fn (*task.Task, *std.mem.Allocator) void => element.FN_IPTRTASK_IPTRALLOCATOR_OVOID,
|
||||
fn (fn () void) std.mem.Allocator.Error!*task.Task => element.FN_IFNOVOID_OMEMERRORPTRTASK,
|
||||
fn (fn () void, *std.mem.Allocator) std.mem.Allocator.Error!*task.Task => element.FN_IFNOVOID_IPTRALLOCATOR_OMEMERRORPTRTASK,
|
||||
else => @compileError("Type not supported: " ++ @typeName(T)),
|
||||
};
|
||||
}
|
||||
|
@ -614,7 +677,7 @@ fn getMockObject() *Mock() {
|
|||
if (mock) |*m| {
|
||||
return m;
|
||||
} else {
|
||||
warn("MOCK object doesn't exists, please initiate this test\n", .{});
|
||||
warn("MOCK object doesn't exists, please initialise this test\n", .{});
|
||||
expect(false);
|
||||
unreachable;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue