lockfree

lockfree.git
git clone git://git.lenczewski.org/lockfree.git
Log | Files | Refs | README | LICENSE

benchmark.h (437B)


      1 #ifndef BENCHMARK_H
      2 #define BENCHMARK_H
      3 
      4 #include <stdint.h>
      5 
      6 #ifdef __cplusplus
      7 extern "C" {
      8 #endif
      9 
     10 typedef void *(benchmark_init_t)(size_t threads);
     11 typedef void  (benchmark_free_t)(void *state);
     12 typedef int   (benchmark_work_t)(void *state, size_t thread_id);
     13 
     14 struct benchmark {
     15 	char const *name;
     16 	benchmark_init_t *init;
     17 	benchmark_free_t *free;
     18 	benchmark_work_t *work;
     19 };
     20 
     21 #ifdef __cplusplus
     22 };
     23 #endif
     24 
     25 #endif /* BENCHMARK_H */