coccinelle: mini_lock: improve performance

Replace <+... ...+> by ... when any.  <+... ...+> is slow, and in some
obscure cases involving backward jumps it doesn't force the unlock to
actually come after the end of the if.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Julia Lawall 2018-05-21 08:58:48 +02:00 committed by Masahiro Yamada
parent 4c1d9bb0b5
commit 32d0572a75

View File

@ -67,12 +67,14 @@ identifier lock,unlock;
@@
*lock(E1@p,...);
<+... when != E1
... when != E1
when any
if (...) {
... when != E1
* return@r ...;
}
...+>
... when != E1
when any
*unlock@up(E1,...);
@script:python depends on org@