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:
parent
94e0a603f2
commit
65b36e42b8
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
typedef u64 TimerId;
|
||||
TYPEDEF_DISTINCT_ORDERED_ID(u64, TimerId);
|
||||
|
||||
class Timer : public RefCounted<Timer>
|
||||
, public InlineLinkedListNode<Timer> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue