summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/KernelKit/Semaphore.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-31 16:50:34 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-31 16:50:34 +0100
commitad677bd1ed2c6d1a052d426117a4d20a0b59ac52 (patch)
tree67898ad7cb935389619d8e9272cac9a732e24c92 /dev/Kernel/KernelKit/Semaphore.h
parent510c659355d9227d1b75edfe50c1b8691ea2f982 (diff)
FIX: CUSA and improved algorithm.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/KernelKit/Semaphore.h')
-rw-r--r--dev/Kernel/KernelKit/Semaphore.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/dev/Kernel/KernelKit/Semaphore.h b/dev/Kernel/KernelKit/Semaphore.h
index 9ae3f617..41e02645 100644
--- a/dev/Kernel/KernelKit/Semaphore.h
+++ b/dev/Kernel/KernelKit/Semaphore.h
@@ -12,9 +12,9 @@
namespace Kernel
{
- class UserProcess;
+ class UserThread;
- typedef UserProcess* UserProcessPtr;
+ typedef UserThread& UserProcessRef;
/// @brief Access control class, which locks a task until one is done.
class Semaphore final
@@ -31,13 +31,13 @@ namespace Kernel
void WaitForProcess() noexcept;
public:
- bool Lock(UserProcess* process);
- bool LockOrWait(UserProcess* process, TimerInterface* timer);
+ bool Lock(UserThread& process);
+ bool LockOrWait(UserThread& process, TimerInterface* timer);
public:
ZKA_COPY_DEFAULT(Semaphore);
private:
- UserProcessPtr fLockingProcess{nullptr};
+ UserProcessRef fLockingProcess;
};
} // namespace Kernel