Terminal emulator with all the bells and whistles
https://www.enlightenment.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
543 B
38 lines
543 B
// A mutex_lock is not matched by a mutex_unlock before an error return/goto. |
|
@@ |
|
expression l; |
|
identifier LOCK =~ "^.*_lock$"; |
|
identifier UN =~ "^.*_unlock$"; |
|
@@ |
|
|
|
LOCK(l); |
|
... when != UN(l) |
|
when any |
|
when strict |
|
( |
|
{ ... when != UN(l) |
|
+ todo_add_unlock(l); |
|
return ...; |
|
} |
|
| |
|
UN(l); |
|
) |
|
|
|
|
|
// unlock from not locked code |
|
//@@ |
|
//expression E; |
|
//identifier LOCK =~ "^.*_lock$"; |
|
//identifier UN =~ "^.*_unlock$"; |
|
//@@ |
|
//... when != LOCK(E) |
|
//( |
|
//if (...) { |
|
//+add_LOCK(E); |
|
//... when != LOCK(E) |
|
// UN(E); |
|
// return ...; |
|
//} |
|
//| |
|
//UN(E) |
|
//)
|
|
|