static gpointer run_thread (GTest * test) { gint i = 1; #ifndef SYMBIAN while (!stopping) { if (TESTNUM == 1) g_test_do_signal1 (test); if (TESTNUM == 2) g_test_do_signal2 (test); if (TESTNUM == 3) g_test_do_prop (test); if ((i++ % 10000) == 0) { g_print ("."); g_thread_yield(); /*force context switch */ } } #else #ifdef MULTITHREAD while (!stopping) { if (TESTNUM == 1) g_test_do_signal1 (test); if (TESTNUM == 2) g_test_do_signal2 (test); if (TESTNUM == 3) g_test_do_prop (test); if ((i++ % 10/*000*/) == 0) { #ifdef VERBOSE g_print ("."); #endif /*VERBOSE*/ g_thread_yield(); /* force context switch */ } } #else for(i=0; i <= LOOP; i++) { if (TESTNUM == 1) g_test_do_signal1 (test); if (TESTNUM == 2) g_test_do_signal2 (test); if (TESTNUM == 3) g_test_do_prop (test); #ifdef VERBOSE g_print("."); #endif } #endif /*MULTITHREAD*/ #endif /*SYMBIAN*/ return NULL; }
static gpointer run_thread (GTest * test) { gint i = 1; while (!stopping) { if (TESTNUM == 1) g_test_do_signal1 (test); if (TESTNUM == 2) g_test_do_signal2 (test); if (TESTNUM == 3) g_test_do_prop (test); if ((i++ % 10000) == 0) { g_print ("."); g_thread_yield(); /* force context switch */ } } return NULL; }