3 #define ITERATIONS 100000000
8 guint64 start = g_get_monotonic_time ();
12 for (i = 0; i < ITERATIONS; i++)
14 g_bit_lock (&lock, 0);
15 g_bit_unlock (&lock, 0);
22 elapsed = g_get_monotonic_time () - start;
24 rate = ITERATIONS / elapsed;
26 g_test_maximized_result (rate, "iterations per second");
31 main (int argc, char **argv)
33 g_test_init (&argc, &argv, NULL);
36 g_test_add_func ("/bitlock/performance/uncontended", test_bitlocks);