source:
benchmark/mutex/cfa2.cfa@
ee0bfa9
| Last change on this file since ee0bfa9 was dc33b5b, checked in by , 6 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.