| Subject | Re: [patch 03/63] sched: Prepare for RT sleeping spin/rwlocks | From | Mike Galbraith <> | Date | Sun, 01 Aug 2021 17:30:06 +0200 |
| |
On Fri, 2021-07-30 at 15:50 +0200, Thomas Gleixner wrote: > > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -155,6 +155,27 @@ struct task_group; > WRITE_ONCE(current->__state, (state_value)); \ > raw_spin_unlock_irqrestore(¤t->pi_lock, flags); \ > } while (0) > + > + > +#define current_save_and_set_rtlock_wait_state() \ > + do { \ > + raw_spin_lock(¤t->pi_lock); \ > + current->saved_state = current->__state; \ ^^should that be using READ_ONCE()?
> +#define current_save_and_set_rtlock_wait_state() \ > + do { \ > + raw_spin_lock(¤t->pi_lock); \ > + current->saved_state = current->__state; \ ^^ditto?
|