| 
            Last change
 on this file since db94b5d was             a5d1fe7, checked in by caparsons <caparson@…>, 4 years ago           | 
        
        
          | 
             
added mutexStmt benchmarks 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            329 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #include <locks.hfa>
 | 
|---|
| 2 | #include <mutex_stmt.hfa>
 | 
|---|
| 3 | #include <stdio.h>
 | 
|---|
| 4 | 
 | 
|---|
| 5 | #include "bench.h"
 | 
|---|
| 6 | 
 | 
|---|
| 7 | test_spinlock l1, l2, l3, l4;
 | 
|---|
| 8 | 
 | 
|---|
| 9 | int main( int argc, char * argv[] ) {
 | 
|---|
| 10 |         BENCH_START()
 | 
|---|
| 11 |         BENCH(
 | 
|---|
| 12 |                 for ( times ) {
 | 
|---|
| 13 |                         mutex ( l1, l2, l3, l4 ) { }
 | 
|---|
| 14 |                 },
 | 
|---|
| 15 |                 result
 | 
|---|
| 16 |         )
 | 
|---|
| 17 |         printf( "%g\n", result );
 | 
|---|
| 18 | }
 | 
|---|
| 19 | 
 | 
|---|
| 20 | // Local Variables: //
 | 
|---|
| 21 | // tab-width: 4 //
 | 
|---|
| 22 | // End: //
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.