| 294 | } |
| 295 | |
| 296 | bool run () |
| 297 | { |
| 298 | numFailed.store(0); |
| 299 | |
| 300 | size_t numThreads = getNumberOfLogicalThreads(); |
| 301 | barrier.init(numThreads+1); |
| 302 | |
| 303 | /* create threads */ |
| 304 | std::vector<thread_t> threads; |
| 305 | for (size_t i=0; i<numThreads; i++) |
| 306 | threads.push_back(createThread((thread_func)thread_alloc,this,0,i)); |
| 307 | |
| 308 | /* run test */ |
| 309 | barrier.wait(); |
| 310 | barrier.wait(); |
| 311 | |
| 312 | /* destroy threads */ |
| 313 | for (size_t i=0; i<numThreads; i++) |
| 314 | join(threads[i]); |
| 315 | |
| 316 | return numFailed == 0; |
| 317 | } |
| 318 | }; |
| 319 | |
| 320 | cache_regression_test cache_regression; |
nothing calls this directly
no test coverage detected