source:
benchmark/mutex/cfa2.cfa
@
f9bf142
Last change on this file since f9bf142 was dc33b5b, checked in by , 5 years ago | |
---|---|
|
|
File size: 280 bytes |
Rev | Line | |
---|---|---|
[73abe95] | 1 | #include <monitor.hfa> |
[f54a0ab] | 2 | #include <stdio.h> |
3 | ||
4 | #include "bench.h" | |
5 | ||
6 | monitor M {}; | |
[9f0b975] | 7 | void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) {} |
[f54a0ab] | 8 | |
9 | int main(int argc, char* argv[]) { | |
10 | M m1, m2; | |
11 | BENCH( | |
[dc33b5b] | 12 | for ( i; n ) { |
[f54a0ab] | 13 | call(m1, m2); |
14 | }, | |
15 | result | |
16 | ) | |
17 | ||
[dc33b5b] | 18 | printf("%g\n", result); |
19 | } |
Note: See TracBrowser
for help on using the repository browser.