diff options
author | Marvin Borner | 2020-08-09 16:51:01 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-09 16:51:01 +0200 |
commit | 162d024a53e1e31e00ff0b6f47dd4590edebc551 (patch) | |
tree | 711d3886c300dfaddffdafaa89b690b45eb2101d /src/inc/cpu.h | |
parent | 79f2fa136f26a0b87917336e089485712ee49bd6 (diff) |
Heavy restructuring of libc, kernel and apps
Diffstat (limited to 'src/inc/cpu.h')
-rw-r--r-- | src/inc/cpu.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/inc/cpu.h b/src/inc/cpu.h deleted file mode 100644 index eb09291..0000000 --- a/src/inc/cpu.h +++ /dev/null @@ -1,29 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef CPU_H -#define CPU_H - -#include <def.h> - -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(); - -static inline void spinlock(int *ptr) -{ - int prev; - do - __asm__ volatile("lock xchgl %0,%1" : "=a"(prev) : "m"(*ptr), "a"(1)); - while (prev); -} - -#endif |