From 9f16b032d38613ca95e321e1d1e652c43129c68b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 15 Aug 2020 17:42:36 +0200 Subject: Added libgui --- lib/inc/cpu.h | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 lib/inc/cpu.h (limited to 'lib/inc/cpu.h') diff --git a/lib/inc/cpu.h b/lib/inc/cpu.h deleted file mode 100644 index 2d367cb..0000000 --- a/lib/inc/cpu.h +++ /dev/null @@ -1,30 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef CPU_H -#define CPU_H - -#include - -u8 inb(u16 port); -u16 inw(u16 port); -u32 inl(u16 port); -void insl(u16 port, void *addr, int n); - -void outb(u16 port, u8 data); -void outw(u16 port, u16 data); -void outl(u16 port, u32 data); -void cli(); -void sti(); -void hlt(); -void idle(); -void loop(); - -static inline void spinlock(int *ptr) -{ - int prev; - do - __asm__ volatile("lock xchgl %0,%1" : "=a"(prev) : "m"(*ptr), "a"(1)); - while (prev); -} - -#endif -- cgit v1.2.3