lkml.org 
[lkml]   [2019]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sched: make struct task_struct::state 32-bit
From
Date
> // 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

\
 
 \ /
  Last update: 2019-09-24 10:08    [W:2.978 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site