1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

Kernel: Make TimerId a distinct type

Well, that was easy\! :^)
This commit is contained in:
Ben Wiederhake 2021-02-28 00:01:47 +01:00 committed by Andreas Kling
parent 94e0a603f2
commit 65b36e42b8
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ TimerId TimerQueue::add_timer(NonnullRefPtr<Timer>&& timer)
timer->m_id = ++m_timer_id_count;
VERIFY(timer->m_id != 0); // wrapped
add_timer_locked(move(timer));
return m_timer_id_count;
return timer->m_id;
}
void TimerQueue::add_timer_locked(NonnullRefPtr<Timer> timer)

View file

@ -36,7 +36,7 @@
namespace Kernel {
typedef u64 TimerId;
TYPEDEF_DISTINCT_ORDERED_ID(u64, TimerId);
class Timer : public RefCounted<Timer>
, public InlineLinkedListNode<Timer> {