summaryrefslogtreecommitdiff
path: root/kern/thread_i.h
diff options
context:
space:
mode:
authorAgustina Arzille <avarzille@riseup.net>2017-05-05 04:01:13 -1000
committerRichard Braun <rbraun@sceen.net>2017-05-09 21:17:58 +0200
commitbcbe8dc991a9ec63f30d50ed4cca89fd9e6b7ff7 (patch)
tree389517510b8d19082d02f36453dbf68356b548fb /kern/thread_i.h
parentb5864f82b9c0d8ea2e825e7d86bd8cdeb825f870 (diff)
Replace sequential consistency with more efficient orders
Diffstat (limited to 'kern/thread_i.h')
-rw-r--r--kern/thread_i.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/thread_i.h b/kern/thread_i.h
index 34761e56..2e1b88aa 100644
--- a/kern/thread_i.h
+++ b/kern/thread_i.h
@@ -195,13 +195,13 @@ void thread_destroy(struct thread *thread);
static inline void
thread_set_flag(struct thread *thread, unsigned long flag)
{
- atomic_or(&thread->flags, flag, ATOMIC_SEQ_CST);
+ atomic_or_acq_rel(&thread->flags, flag);
}
static inline void
thread_clear_flag(struct thread *thread, unsigned long flag)
{
- atomic_and(&thread->flags, ~flag, ATOMIC_SEQ_CST);
+ atomic_and_acq_rel(&thread->flags, ~flag);
}
static inline int