diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-03-15 11:29:26 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2025-03-15 12:03:23 +0000 |
| commit | 2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b (patch) | |
| tree | 04f77a457517c8c36e22dead8261191e560eae6d /arch/x86_64/src/shared | |
| parent | f2b9ac8f0f22354241e9b78e47aa7cb94e5ef511 (diff) | |
| download | teachos-2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b.tar.xz teachos-2b8e6e7e10f084a9a9ba5c0b79a041f4d1ac459b.zip | |
implement loading of gdtr register
Diffstat (limited to 'arch/x86_64/src/shared')
| -rw-r--r-- | arch/x86_64/src/shared/mutex.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/x86_64/src/shared/mutex.cpp b/arch/x86_64/src/shared/mutex.cpp deleted file mode 100644 index 6598255..0000000 --- a/arch/x86_64/src/shared/mutex.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "arch/shared/mutex.hpp" - -namespace teachos::arch::shared -{ - auto mutex::lock() -> void - { - while (!try_lock()) - { - // Nothing to do - } - } - - auto mutex::try_lock() -> bool { return !locked.exchange(true, std::memory_order_acquire); } - - auto mutex::unlock() -> void { locked.store(false, std::memory_order_release); } -} // namespace teachos::arch::shared |
