diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-27 12:10:40 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-27 12:10:40 +0100 |
| commit | 97d65565f4ab1814ea76aafc66e2bae848071a7c (patch) | |
| tree | e007378f4c0f23ee8e6cd9acfec022c1020e75d5 /dev/Kernel/src/User.cc | |
| parent | 205605bd8eabe7cdb5ee4cb1b974d613705337a2 (diff) | |
Kernel: Fixes and improvements to scheduler.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/src/User.cc')
| -rw-r--r-- | dev/Kernel/src/User.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dev/Kernel/src/User.cc b/dev/Kernel/src/User.cc index 8d1bcac9..88d14b2f 100644 --- a/dev/Kernel/src/User.cc +++ b/dev/Kernel/src/User.cc @@ -27,9 +27,11 @@ namespace Kernel { namespace Detail { + //////////////////////////////////////////////////////////// /// \brief Constructs a password by hashing the password. /// \param password password to hash. /// \return the hashed password + //////////////////////////////////////////////////////////// const Int32 cred_construct_token(Char* password, const Char* in_password, User* user, SizeT length) { if (!password || !user) @@ -53,7 +55,9 @@ namespace Kernel } } // namespace Detail + //////////////////////////////////////////////////////////// /// @brief User ring constructor. + //////////////////////////////////////////////////////////// User::User(const Int32& sel, const Char* userName) : mUserRing((UserRingKind)sel) { @@ -61,14 +65,18 @@ namespace Kernel rt_copy_memory((VoidPtr)userName, this->mUserName, rt_string_len(userName)); } + //////////////////////////////////////////////////////////// /// @brief User ring constructor. + //////////////////////////////////////////////////////////// User::User(const UserRingKind& ringKind, const Char* userName) : mUserRing(ringKind) { rt_copy_memory((VoidPtr)userName, this->mUserName, rt_string_len(userName)); } + //////////////////////////////////////////////////////////// /// @brief User destructor class. + //////////////////////////////////////////////////////////// User::~User() = default; Bool User::Save(const usr_public_key_kind password_to_fill) noexcept @@ -159,8 +167,11 @@ namespace Kernel return this->mUserName; } + //////////////////////////////////////////////////////////// /// @brief Returns the user's ring. /// @return The king of ring the user is attached to. + //////////////////////////////////////////////////////////// + const UserRingKind& User::Ring() noexcept { return this->mUserRing; |
