diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-01 03:54:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-01 03:54:14 -0500 |
| commit | 896149a7047fe86c0b292cf05ad610081b7513db (patch) | |
| tree | e85ff617016dbb2b93101d8d874bc9f3afb30786 /src/kernel/KernelKit | |
| parent | cd0c176275687a552bc546395bd2a39c92a3dd1b (diff) | |
| parent | c9a2f8a539d4554b7f3e4fb9819cae6dcb606029 (diff) | |
Merge pull request #99 from nekernel-org/develop
chore: typedefs breaking changes, and binary mutex new `LockedPtr` type.
Diffstat (limited to 'src/kernel/KernelKit')
| -rw-r--r-- | src/kernel/KernelKit/BinaryMutex.h | 8 | ||||
| -rw-r--r-- | src/kernel/KernelKit/CodeMgr.h | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/kernel/KernelKit/BinaryMutex.h b/src/kernel/KernelKit/BinaryMutex.h index 8e29c834..f8a2898b 100644 --- a/src/kernel/KernelKit/BinaryMutex.h +++ b/src/kernel/KernelKit/BinaryMutex.h @@ -16,6 +16,8 @@ class USER_PROCESS; /// @brief Access control class, which locks a task until one is done. class BinaryMutex final { public: + using LockedPtr = USER_PROCESS*; + explicit BinaryMutex() = default; ~BinaryMutex() = default; @@ -27,13 +29,13 @@ class BinaryMutex final { BOOL WaitForProcess(const UInt32& sec); public: - bool Lock(USER_PROCESS* process); - bool LockAndWait(USER_PROCESS* process, TimerInterface* timer); + bool Lock(LockedPtr process); + bool LockAndWait(LockedPtr process, TimerInterface* timer); public: NE_COPY_DEFAULT(BinaryMutex) private: - USER_PROCESS* fLockingProcess{nullptr}; + LockedPtr fLockingProcess{nullptr}; }; } // namespace Kernel diff --git a/src/kernel/KernelKit/CodeMgr.h b/src/kernel/KernelKit/CodeMgr.h index f3260f1f..dc08fc99 100644 --- a/src/kernel/KernelKit/CodeMgr.h +++ b/src/kernel/KernelKit/CodeMgr.h @@ -24,8 +24,8 @@ /// @author Amlal El Mahrouss (amlal@nekernel.org) namespace Kernel { -/// @brief Main process entrypoint. -typedef void (*rtl_main_kind)(void); +/// @brief Image process entrypoint. +typedef void (*rtl_start_kind)(void); /// @brief C++ Constructor entrypoint. typedef void (*rtl_cxx_ctor_kind)(void); @@ -45,5 +45,5 @@ BOOL rtl_create_kernel_task(HAL::StackFramePtr main, const KID kid); /// accessible. /// @param main the start of the process. /// @return The team's process id. -ProcessID rtl_create_user_process(rtl_main_kind main, const Char* process_name); +ProcessID rtl_create_user_process(rtl_start_kind main, const Char* process_name); } // namespace Kernel |
