lkml.org 
[lkml]   [2021]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 03/63] sched: Prepare for RT sleeping spin/rwlocks
From
Date
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(&current->pi_lock, flags);   \
>         } while (0)
> +
> +
> +#define current_save_and_set_rtlock_wait_state()                       \
> +       do {                                                            \
> +               raw_spin_lock(&current->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(&current->pi_lock);                       \
> +               current->saved_state = current->__state;                \
^^ditto?


\
 
 \ /
  Last update: 2021-08-01 17:31    [W:0.392 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site