[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af969579-116c-fba7-fd32-15a876ac0445@web.de>
Date: Tue, 24 Sep 2019 10:07:54 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Valentin Schneider <valentin.schneider@....com>,
Alexey Dobriyan <adobriyan@...il.com>, dm-devel@...hat.com,
linux-block@...r.kernel.org, rcu@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Andrea Arcangeli <aarcange@...hat.com>,
Ingo Molnar <mingo@...hat.com>, Jens Axboe <axboe@...nel.dk>,
Peter Zijlstra <peterz@...radead.org>,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: sched: make struct task_struct::state 32-bit
> // FIXME: current not recognized as task_struct*, fixhack with regexp
> identifier current =~ "^current$";
Would you really like to use a regular expression for finding a single word?
> identifier state_var;
> position pos;
> @@
>
> (
> p->state & state_var@pos
> |
> current->state & state_var@pos
> |
I see further opportunities to make such a SmPL disjunction more succinct.
*
( ( \( p \| current \) ) -> state & state_var@pos
|
…
* How do you think about to work with a SmPL constraint
for a metavariable with the type “binary operator”?
> set_current_state(state_var@pos)
> |
> set_special_state(state_var@pos)
| \( set_current_state \| set_special_state \) (state_var@pos)
> |
> signal_pending_state(state_var@pos, p)
> |
> signal_pending_state(state_var@pos, current)
| signal_pending_state(state_var@pos, \( p \| current \) )
Regards,
Markus
Powered by blists - more mailing lists