summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/Semaphore.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Private/KernelKit/Semaphore.hpp')
-rw-r--r--Private/KernelKit/Semaphore.hpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/Private/KernelKit/Semaphore.hpp b/Private/KernelKit/Semaphore.hpp
deleted file mode 100644
index 523fecb5..00000000
--- a/Private/KernelKit/Semaphore.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -------------------------------------------
-
- Copyright Mahrouss Logic
-
-------------------------------------------- */
-
-#pragma once
-
-#include <NewKit/Defines.hpp>
-#include <CompilerKit/CompilerKit.hxx>
-
-namespace NewOS
-{
- class ProcessHeader;
-
- typedef ProcessHeader* ProcessHeaderRef;
-
- /// @brief Access control class, which locks a task until one is done.
- class Semaphore final
- {
- public:
- explicit Semaphore() = default;
- ~Semaphore() = default;
-
- public:
- bool IsLocked() const;
- bool Unlock() noexcept;
-
- public:
- void Sync() noexcept;
-
- public:
- bool Lock(ProcessHeader* process);
- bool LockOrWait(ProcessHeader* process, const Int64& seconds);
-
- public:
- NEWOS_COPY_DEFAULT(Semaphore);
-
- private:
- ProcessHeaderRef fLockingProcess{nullptr};
- };
-} // namespace NewOS