#include #include #include #include #include #include #include /* for SSE/AVX intrinsics */ #define NB_TH 4 #define NB_JOBS 500000000 #define NB_EVENTS (NB_JOBS/100) struct event { int result; }; struct trace { int nb_events; struct event *event_array; char padding[128]; }; struct trace t_th[NB_TH]; sem_t thread_ready; #define TIME_DIFF(t1, t2) (((t2).tv_sec-(t1).tv_sec)*1e9+((t2).tv_nsec-(t1).tv_nsec)) void analyze_events(int thread_id) { int i; int result = 0; for(i=0; i