frr/tools/coccinelle/frr_with_mutex.cocci
Daniel Baumann 3124f89aed
Adding upstream version 10.1.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 10:03:58 +01:00

23 lines
252 B
Text

@@
expression E;
iterator name frr_with_mutex;
@@
- pthread_mutex_lock(E);
+ frr_with_mutex(E) {
- {
...
- }
- pthread_mutex_unlock(E);
+ }
@@
expression E;
@@
- pthread_mutex_lock(E);
+ frr_with_mutex(E) {
...
- pthread_mutex_unlock(E);
+ }