MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / main

Function main

util/threadtest.cpp:83–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83int main(void)
84{
85 TestThread *testThread[5]; Thread *thread[5]; int i;
86
87 try
88 {
89 printf("Number of CPU cores in this system: %d\n", NumProcs());
90 printf("Word size = %d-bit\n", (int)sizeof(long *) * 8);
91
92 event.wait();
93
94 for(i = 0; i < 5; i++)
95 {
96 testThread[i] = new TestThread(i + 1);
97 thread[i] = new Thread(testThread[i]);
98 thread[i]->start();
99 }
100 for(i = 0; i < 5; i++) thread[i]->stop();
101 for(i = 0; i < 5; i++) thread[i]->checkError();
102 }
103 catch(std::exception &e)
104 {
105 printf("Error in %s:\n%s\n", GET_METHOD(e), e.what());
106 return -1;
107 }
108
109 return 0;
110}

Callers

nothing calls this directly

Calls 6

NumProcsFunction · 0.85
checkErrorMethod · 0.80
whatMethod · 0.80
waitMethod · 0.45
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected