feat: make kernel architecture-agnostic; primitive work on arm port
This commit is contained in:
1 parent
dab7d5427b
commit
1bae77ec84
164 files changed
+3664
-1641
No files matched your search
@@ -6,6 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
#include <atomic>
|
||||
#include <Arch/Cpu.hpp>
|
||||
|
||||
namespace kcp {
|
||||
class Spinlock {
|
||||
@@ -32,7 +33,7 @@ namespace kcp {
|
||||
public:
|
||||
void Acquire() {
|
||||
while (flag.test_and_set(std::memory_order_acquire)) {
|
||||
asm volatile("pause");
|
||||
Arch::Pause();
|
||||
}
|
||||
}
|
||||
void Release() {
|
||||
|
||||
Reference in new issue
Block a user