Changeset 25598 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Dec 31, 2009 12:36:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/thread.cpp
r25528 r25598 1314 1314 Assert(RTTHREAD_IS_SLEEPING(enmState)); 1315 1315 PRTTHREADINT pThread = hThread; 1316 if (hThread && rtThreadGetState(pThread) != RTTHREADSTATE_RUNNING)1316 if (hThread && rtThreadGetState(pThread) == RTTHREADSTATE_RUNNING) 1317 1317 rtThreadSetState(pThread, enmState); 1318 1318 } … … 1335 1335 } 1336 1336 RT_EXPORT_SYMBOL(RTThreadUnblocked); 1337 1338 1339 /** 1340 * Get the current thread state. 1341 * 1342 * @returns The thread state. 1343 * @param hThread The thread. 1344 */ 1345 RTDECL(RTTHREADSTATE) RTThreadGetState(RTTHREAD hThread) 1346 { 1347 RTTHREADSTATE enmState = RTTHREADSTATE_INVALID; 1348 PRTTHREADINT pThread = rtThreadGet(hThread); 1349 if (pThread) 1350 { 1351 enmState = rtThreadGetState(pThread); 1352 rtThreadRelease(pThread); 1353 } 1354 return enmState; 1355 } 1356 RT_EXPORT_SYMBOL(RTThreadGetState); 1337 1357 1338 1358
Note:
See TracChangeset
for help on using the changeset viewer.