diff --git a/kernel/src/interrupts.cpp b/kernel/src/interrupts.cpp index 800073de..a92b69e1 100644 --- a/kernel/src/interrupts.cpp +++ b/kernel/src/interrupts.cpp @@ -67,13 +67,13 @@ void idt_set_gate(size_t gate, void (*function)(void), uint16_t gdt_selector, id uint64_t get_cr2(){ uint64_t value; - __asm__ __volatile__("mov rax, cr2; mov %0, rax;" : "=m" (value)); + asm volatile("mov rax, cr2; mov %0, rax;" : "=m" (value)); return value; } uint64_t get_cr3(){ uint64_t value; - __asm__ __volatile__("mov rax, cr3; mov %0, rax;" : "=m" (value)); + asm volatile("mov rax, cr3; mov %0, rax;" : "=m" (value)); return value; } @@ -89,7 +89,7 @@ void install_idt(){ std::fill_n(irq_handlers, 16, nullptr); //Give the IDTR address to the CPU - __asm__ __volatile__("lidt [%0]" : : "m" (idtr_64)); + asm volatile("lidt [%0]" : : "m" (idtr_64)); } void install_isrs(){ @@ -181,7 +181,7 @@ void install_syscalls(){ } void enable_interrupts(){ - __asm__ __volatile__("sti" : : ); + asm volatile("sti" : : ); } const char* exceptions_title[32] { diff --git a/kernel/src/timer.cpp b/kernel/src/timer.cpp index 2bf1deda..d7d170cb 100644 --- a/kernel/src/timer.cpp +++ b/kernel/src/timer.cpp @@ -50,21 +50,21 @@ void timer::sleep_ms(uint64_t delay){ _timer_countdown = delay; while(true){ - __asm__ __volatile__ ("cli"); + asm volatile ("cli"); if(_timer_countdown != 0){ - __asm__ __volatile__ ("sti"); - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); + asm volatile ("sti"); + asm volatile ("nop"); + asm volatile ("nop"); + asm volatile ("nop"); + asm volatile ("nop"); + asm volatile ("nop"); } else { break; } } - __asm__ __volatile__ ("sti"); + asm volatile ("sti"); } uint64_t timer::ticks(){