diff options
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/thread.h b/kern/thread.h index b97dbed..787ccf5 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -296,7 +296,7 @@ thread_ref(struct thread *thread) { unsigned long nr_refs; - nr_refs = atomic_fetch_add(&thread->nr_refs, 1, ATOMIC_RELAXED); + nr_refs = atomic_fetch_add(&thread->nr_refs, 1UL, ATOMIC_RELAXED); assert(nr_refs != (unsigned long)-1); } @@ -305,7 +305,7 @@ thread_unref(struct thread *thread) { unsigned long nr_refs; - nr_refs = atomic_fetch_sub(&thread->nr_refs, 1, ATOMIC_ACQ_REL); + nr_refs = atomic_fetch_sub(&thread->nr_refs, 1UL, ATOMIC_ACQ_REL); assert(nr_refs != 0); if (nr_refs == 1) { |