diff options
author | Remy Noel <mocramis@gmail.com> | 2018-05-03 16:15:28 +0200 |
---|---|---|
committer | Remy Noel <mocramis@gmail.com> | 2018-05-03 16:15:28 +0200 |
commit | 58c17bd912ec450f8132597cdba6afd300a63586 (patch) | |
tree | bc78f8d7fc585e4d4762daccf9cbd62f95791ceb /kern/thread.h | |
parent | bf16bb3d761063aee9ee2b20aba15a7267d473ac (diff) | |
parent | 7769b9765c40a78b8af2568161da404e4e22a77c (diff) |
Merge branch 'master' into perfmon
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) { |