Changeset 6095 in vbox
- Timestamp:
- Dec 15, 2007 9:48:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstTSC.cpp
r5999 r6095 317 317 if (!g_cFailed) 318 318 { 319 /* sort it by apic id first. */ 320 bool fDone; 321 do 322 { 323 for (i = 1, fDone = true; i < cCpus; i++) 324 if (s_aData[i - 1].u8ApicId > s_aData[i].u8ApicId) 325 { 326 TSCDATA Tmp = s_aData[i - 1]; 327 s_aData[i - 1] = s_aData[i]; 328 s_aData[i] = Tmp; 329 fDone = false; 330 } 331 } while (!fDone); 332 319 333 RTPrintf(" # ID TSC\n" 320 334 "-----------------------\n"); … … 330 344 */ 331 345 ASMAtomicXchgSize(&g_fDone, true); 332 for (i = 1; i < cCpus; i++) 333 { 334 int rc = RTThreadUserSignal(s_aData[i].Thread); 335 if (RT_FAILURE(rc)) 336 RTPrintf("tstTSC: WARNING - RTThreadUserSignal(%#u) -> rc=%Rrc! (2)\n", i, rc); 337 } 338 for (i = 1; i < cCpus; i++) 339 { 340 int rc = RTThreadWait(s_aData[i].Thread, 5000, NULL); 341 if (RT_FAILURE(rc)) 342 RTPrintf("tstTSC: WARNING - RTThreadWait(%#u) -> rc=%Rrc!\n", i, rc); 343 } 346 for (i = 0; i < cCpus; i++) 347 if (s_aData[i].Thread != RTThreadSelf()) 348 { 349 int rc = RTThreadUserSignal(s_aData[i].Thread); 350 if (RT_FAILURE(rc)) 351 RTPrintf("tstTSC: WARNING - RTThreadUserSignal(%#u) -> rc=%Rrc! (2)\n", i, rc); 352 } 353 for (i = 0; i < cCpus; i++) 354 if (s_aData[i].Thread != RTThreadSelf()) 355 { 356 int rc = RTThreadWait(s_aData[i].Thread, 5000, NULL); 357 if (RT_FAILURE(rc)) 358 RTPrintf("tstTSC: WARNING - RTThreadWait(%#u) -> rc=%Rrc!\n", i, rc); 359 } 344 360 345 361 return g_cFailed != 0 || g_cRead != cCpus;
Note:
See TracChangeset
for help on using the changeset viewer.