Home | History | Annotate | Download | only in threadtest

Lines Matching full:threads

32 //   Windows specific code for starting threads
77 // UNIX specific code for starting threads
147 // that is shared by all threads.
149 // During the test, the threads will access this info without
172 // The main program monitors the threads by looking
198 UMTX gStopMutex; // Lets main thread suspend test threads.
200 // worker threads and the main thread
235 else if (strcmp(argv[argnum], "-threads") == 0)
288 fprintf(stderr, "usage: threadtest [-threads nnn] [-time nnn] [-quiet] [-verbose] test-name\n"
291 " -threads nnn Number of threads. Default is 2. \n"
306 // threadMain The main function for each of the swarm of test threads.
397 // Fire off the requested number of parallel threads
404 gRunInfo.stopFlag = TRUE; // Will cause the new threads to block
421 // Unblock the threads.
423 gRunInfo.stopFlag = FALSE; // Unblocks the worker threads.
427 // Loop, watching the heartbeat of the worker threads.
429 // display "+" if all threads have completed at least one loop
432 // Stop all the worker threads at the top of their loop, then
437 ThreadFuncs::Sleep(1000); // We sleep while threads do their work ...
472 fprintf(stderr, "Main: suspending all threads\n");
474 umtx_lock(&gStopMutex); // Block the worker threads at the top of their loop
492 fprintf(stderr, "Main: starting all threads.\n");
494 gRunInfo.stopFlag = FALSE; // Unblock the worker threads.
502 // Tell the threads to exit.
514 // Tally up the total number of cycles completed by each of the threads.