mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
move spinlock.h
the implementation is more arch specific than anything. it has been placed under arch/include
This commit is contained in:
@@ -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
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user