summaryrefslogtreecommitdiffstats
path: root/tools/coccinelle/frr_with_mutex.cocci
blob: ec8b73917cd19822de08294044cfdc176975a87e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@@
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);
+ }