Compare commits

..

No commits in common. "9cdf9aa71bf2bec8f49a9022978135d7579cd0d6" and "f0d5b60b83200a51d4b93896cfa46f68b155af6e" have entirely different histories.

2 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,11 @@
pub inline fn inb(port: u16) u8 { pub fn inb(port: u16) u8 {
return asm volatile ("inb %[port], %[result]" return asm volatile ("inb %[port], %[result]"
: [result] "={al}" (-> u8), : [result] "={al}" (-> u8),
: [port] "N{dx}" (port), : [port] "N{dx}" (port),
); );
} }
pub inline fn outb(port: u16, value: u8) void { pub fn outb(port: u16, value: u8) void {
return asm volatile ("outb %[data], %[port]" return asm volatile ("outb %[data], %[port]"
: :
: [port] "{dx}" (port), : [port] "{dx}" (port),
@ -13,14 +13,14 @@ pub inline fn outb(port: u16, value: u8) void {
); );
} }
pub inline fn inw(port: u16) u16 { pub fn inw(port: u16) u16 {
return asm volatile ("inw %[port], %[result]" return asm volatile ("inw %[port], %[result]"
: [result] "={ax}" (-> u16), : [result] "={ax}" (-> u16),
: [port] "N{dx}" (port), : [port] "N{dx}" (port),
); );
} }
pub inline fn outw(port: u16, value: u16) void { pub fn outw(port: u16, value: u16) void {
return asm volatile ("outw %[data], %[port]" return asm volatile ("outw %[data], %[port]"
: :
: [port] "{dx}" (port), : [port] "{dx}" (port),
@ -28,14 +28,14 @@ pub inline fn outw(port: u16, value: u16) void {
); );
} }
pub inline fn inl(port: u16) u32 { pub fn inl(port: u16) u32 {
return asm volatile ("inl %[port], %[result]" return asm volatile ("inl %[port], %[result]"
: [result] "={eax}" (-> u16), : [result] "={eax}" (-> u16),
: [port] "N{dx}" (port), : [port] "N{dx}" (port),
); );
} }
pub inline fn outl(port: u16, value: u32) void { pub fn outl(port: u16, value: u32) void {
return asm volatile ("outw %[data], %[port]" return asm volatile ("outw %[data], %[port]"
: :
: [port] "{dx}" (port), : [port] "{dx}" (port),

View File

@ -59,7 +59,7 @@ pub fn switchTask(regs: *interrupts.InterruptStackFrame, new_task: *ThreadContro
pub fn fetchNewTask(core: *cpu.arch.Core, should_idle_if_not_found: bool) ?*ThreadControlBlock { pub fn fetchNewTask(core: *cpu.arch.Core, should_idle_if_not_found: bool) ?*ThreadControlBlock {
const last = core.thread_list.last orelse { const last = core.thread_list.last orelse {
if (should_idle_if_not_found) { if (should_idle_if_not_found) {
return &core.idle_thread.data; return &core.idle_thread;
} else return null; } else return null;
}; };