Changes in benchmark/mutex/pthreads.c [b4107c8:dc33b5b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/mutex/pthreads.c
rb4107c8 rdc33b5b 7 7 8 8 void __attribute__((noinline)) call() { 9 pthread_mutex_lock ( &mutex);10 pthread_mutex_unlock( &mutex);9 pthread_mutex_lock (&mutex); 10 pthread_mutex_unlock(&mutex); 11 11 } 12 int main( int argc, char * argv[] ) { 13 BENCH_START() 12 13 int main(int argc, char* argv[]) { 14 14 BENCH( 15 for ( size_t i = 0; i < times; i++) {15 for (size_t i = 0; i < n; i++) { 16 16 call(); 17 17 }, 18 18 result 19 19 ) 20 printf( "%g\n", result ); 20 21 printf("%g\n", result); 21 22 } 22 23 // Local Variables: //24 // tab-width: 4 //25 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.