move spinlock.h

the implementation is more arch specific than anything. it has been placed under arch/include
This commit is contained in:
Matheus
2022-07-27 22:16:28 -03:00
parent 7bdacfbd7a
commit 0f1222dd6d
3 changed files with 2 additions and 4 deletions
@@ -1,8 +1,6 @@
#ifndef _SPINLOCK_H_INCLUDE
#define _SPINLOCK_H_INCLUDE
// TODO rewrite this in a more arch independent way
static inline void spinlock_acquire(int *lock){
while(!__sync_bool_compare_and_swap(lock, 0, 1)) asm("pause");
}
+1 -1
View File
@@ -3,7 +3,7 @@
#include <limine.h>
#include <stdio.h>
#include <string.h>
#include <kernel/spinlock.h>
#include <arch/spinlock.h>
#define PAGE_SIZE 4096
+1 -1
View File
@@ -2,7 +2,7 @@
#include <kernel/pmm.h>
#include <arch/panic.h>
#include <string.h>
#include <kernel/spinlock.h>
#include <arch/spinlock.h>
#include <stdio.h>
#include <stdbool.h>
#include <limine.h>