| 1 | #include "a.h" |
|---|---|
| 2 | |
| 3 | struct X { |
| 4 | mutex m; |
| 5 | int n __attribute__((guarded_by(m))); |
| 6 | |
| 7 | void f(); |
| 8 | }; |
| 9 | |
| 10 | inline void unlock(X &x) __attribute__((unlock_function(x.m))) { x.m.unlock(); } |
| 11 |
| 1 | #include "a.h" |
|---|---|
| 2 | |
| 3 | struct X { |
| 4 | mutex m; |
| 5 | int n __attribute__((guarded_by(m))); |
| 6 | |
| 7 | void f(); |
| 8 | }; |
| 9 | |
| 10 | inline void unlock(X &x) __attribute__((unlock_function(x.m))) { x.m.unlock(); } |
| 11 |