mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
Kernel: Resolve clang-tidy readability-make-member-function-const
... In files included from Kernel/Thread.cpp or Kernel/Process.cpp Some places the warning is suppressed, because we do not want a const object do have non-const access to the returned sub-object.
This commit is contained in:
parent
a92132e44a
commit
65edc62c02
11 changed files with 18 additions and 14 deletions
|
@ -445,12 +445,14 @@ void Thread::relock_process(LockMode previous_locked, u32 lock_count_to_restore)
|
|||
}
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(readability-make-member-function-const) False positive; We call block<SleepBlocker> which is not const
|
||||
auto Thread::sleep(clockid_t clock_id, const Time& duration, Time* remaining_time) -> BlockResult
|
||||
{
|
||||
VERIFY(state() == Thread::Running);
|
||||
return Thread::current()->block<Thread::SleepBlocker>({}, Thread::BlockTimeout(false, &duration, nullptr, clock_id), remaining_time);
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(readability-make-member-function-const) False positive; We call block<SleepBlocker> which is not const
|
||||
auto Thread::sleep_until(clockid_t clock_id, const Time& deadline) -> BlockResult
|
||||
{
|
||||
VERIFY(state() == Thread::Running);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue