Commits

Kota UENISHI committed d8f1f58

add message printing

Comments (0)

Files changed (1)

   printf("start\n");
   for(i=0;i<N;++i){
     __sync_fetch_and_add(&counter, 1);
+    //counter++;
   }
   return NULL;
 }
   gettimeofday(&end, NULL);
   printf("N * n: %lu\n", thread_num * N);
   printf("counter: %llu\n", counter);
+  printf("%llu inc lost\n", thread_num*N - counter);
   printf("thruput: %f\n",
          counter / ((end.tv_sec - start.tv_sec) + (end.tv_usec - start.tv_usec) / 1000000.0));
   return 0;