diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-22 01:37:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-22 03:34:10 +0200 |
commit | 55adace359bfda606b445b5177ce5138687d4626 (patch) | |
tree | 429f7e24f71cde34f8f54f10b8ae43b74c514488 /Kernel/TimerQueue.cpp | |
parent | 7d5d26b0481221d3ebf420de346cc33b3e003147 (diff) | |
download | serenity-55adace359bfda606b445b5177ce5138687d4626.zip |
Kernel: Rename SpinLock => Spinlock
Diffstat (limited to 'Kernel/TimerQueue.cpp')
-rw-r--r-- | Kernel/TimerQueue.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/TimerQueue.cpp b/Kernel/TimerQueue.cpp index ffa04fa481..f168057165 100644 --- a/Kernel/TimerQueue.cpp +++ b/Kernel/TimerQueue.cpp @@ -14,7 +14,7 @@ namespace Kernel { static Singleton<TimerQueue> s_the; -static SpinLock<u8> g_timerqueue_lock; +static Spinlock<u8> g_timerqueue_lock; Time Timer::remaining() const { @@ -67,7 +67,7 @@ bool TimerQueue::add_timer_without_id(NonnullRefPtr<Timer> timer, clockid_t cloc // returning from the timer handler and a call to cancel_timer(). timer->setup(clock_id, deadline, move(callback)); - ScopedSpinLock lock(g_timerqueue_lock); + ScopedSpinlock lock(g_timerqueue_lock); timer->m_id = 0; // Don't generate a timer id add_timer_locked(move(timer)); return true; @@ -75,7 +75,7 @@ bool TimerQueue::add_timer_without_id(NonnullRefPtr<Timer> timer, clockid_t cloc TimerId TimerQueue::add_timer(NonnullRefPtr<Timer>&& timer) { - ScopedSpinLock lock(g_timerqueue_lock); + ScopedSpinlock lock(g_timerqueue_lock); timer->m_id = ++m_timer_id_count; VERIFY(timer->m_id != 0); // wrapped @@ -130,7 +130,7 @@ bool TimerQueue::cancel_timer(TimerId id) Timer* found_timer = nullptr; Queue* timer_queue = nullptr; - ScopedSpinLock lock(g_timerqueue_lock); + ScopedSpinlock lock(g_timerqueue_lock); for (auto& timer : m_timer_queue_monotonic.list) { if (timer.m_id == id) { found_timer = &timer; @@ -207,7 +207,7 @@ bool TimerQueue::cancel_timer(Timer& timer, bool* was_in_use) if (!did_already_run) { timer.clear_in_use(); - ScopedSpinLock lock(g_timerqueue_lock); + ScopedSpinlock lock(g_timerqueue_lock); if (timer_queue.list.contains(timer)) { // The timer has not fired, remove it VERIFY(timer.ref_count() > 1); @@ -251,7 +251,7 @@ void TimerQueue::remove_timer_locked(Queue& queue, Timer& timer) void TimerQueue::fire() { - ScopedSpinLock lock(g_timerqueue_lock); + ScopedSpinlock lock(g_timerqueue_lock); auto fire_timers = [&](Queue& queue) { auto* timer = queue.list.first(); @@ -274,7 +274,7 @@ void TimerQueue::fire() // our reference and don't execute the callback. if (!timer->set_cancelled()) { timer->m_callback(); - ScopedSpinLock lock(g_timerqueue_lock); + ScopedSpinlock lock(g_timerqueue_lock); m_timers_executing.remove(*timer); } timer->clear_in_use(); |