提交 32d0572a 编写于 作者: J Julia Lawall 提交者: Masahiro Yamada

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: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 4c1d9bb0
......@@ -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@
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册