Skip to content

Commit

Permalink
Kernel: Make TimerId a distinct type
Browse files Browse the repository at this point in the history
Well, that was easy\! :^)
  • Loading branch information
BenWiederhake authored and awesomekling committed Mar 2, 2021
1 parent 94e0a60 commit 65b36e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Kernel/TimerQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Kernel/TimerQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

namespace Kernel {

typedef u64 TimerId;
TYPEDEF_DISTINCT_ORDERED_ID(u64, TimerId);

class Timer : public RefCounted<Timer>
, public InlineLinkedListNode<Timer> {
Expand Down

0 comments on commit 65b36e4

Please sign in to comment.