diff options
Diffstat (limited to 'src/kernel/KernelKit')
| -rw-r--r-- | src/kernel/KernelKit/BinaryMutex.h | 3 | ||||
| -rw-r--r-- | src/kernel/KernelKit/UserProcessScheduler.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/kernel/KernelKit/BinaryMutex.h b/src/kernel/KernelKit/BinaryMutex.h index 2fb390d3..d97ab854 100644 --- a/src/kernel/KernelKit/BinaryMutex.h +++ b/src/kernel/KernelKit/BinaryMutex.h @@ -8,12 +8,14 @@ #include <CompilerKit/CompilerKit.h> #include <KernelKit/Timer.h> +#include <KernelKit/CoreProcessScheduler.h> #include <NeKit/Config.h> namespace Kernel { class UserProcess; /// @brief Access control class, which locks a task until one is done. +/// Implements priority inheritance to prevent priority inversion. class BinaryMutex final { public: using LockedPtr = UserProcess*; @@ -37,6 +39,7 @@ class BinaryMutex final { private: LockedPtr fLockingProcess{nullptr}; + AffinityKind fOwnerOriginalAffinity{AffinityKind::kInvalid}; // for priority inheritance }; } // namespace Kernel diff --git a/src/kernel/KernelKit/UserProcessScheduler.h b/src/kernel/KernelKit/UserProcessScheduler.h index 5018f1f6..8c7a4afa 100644 --- a/src/kernel/KernelKit/UserProcessScheduler.h +++ b/src/kernel/KernelKit/UserProcessScheduler.h @@ -83,9 +83,10 @@ class UserProcess final { kExecutableKindCount, }; - ProcessTime PTime{0}; //! @brief Process allocated tine. + ProcessTime PTime{0}; //! @brief Process allocated time. ProcessTime RTime{0}; //! @brief Process run time. - ProcessTime UTime{0}; //! #brief Process used time. + ProcessTime UTime{0}; //! @brief Process used time. + ProcessTime STime{0}; //! @brief Process sleep time (for dynamic priority boost). ProcessID ProcessId{kCPSInvalidPID}; ExecutableKind Kind{ExecutableKind::kExecutableKind}; |
