Changeset 54452 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Feb 24, 2015 3:03:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTR0ThreadPreemption.cpp
r54449 r54452 69 69 * @param pvUser Pointer to the user argument. 70 70 */ 71 static DECLCALLBACK(void) tstR 0ThreadCtxHook(RTTHREADCTXEVENT enmEvent, void *pvUser)71 static DECLCALLBACK(void) tstRTR0ThreadCtxHook(RTTHREADCTXEVENT enmEvent, void *pvUser) 72 72 { 73 73 PTSTRTR0THREADCTXDATA pData = (PTSTRTR0THREADCTXDATA)pvUser; … … 76 76 if (pData->u32Magic != TSTRTR0THREADCTXDATA_MAGIC) 77 77 { 78 RTStrPrintf(pData->achResult, sizeof(pData->achResult), "!tstR 0ThreadCtxHook: Invalid magic.");78 RTStrPrintf(pData->achResult, sizeof(pData->achResult), "!tstRTR0ThreadCtxHook: Invalid magic."); 79 79 return; 80 80 } … … 93 93 { 94 94 RTStrPrintf(pData->achResult, sizeof(pData->achResult), 95 "!tstR 0ThreadCtxHook[RTTHREADCTXEVENT_PREEMPTING]: Called with preemption enabled");95 "!tstRTR0ThreadCtxHook[RTTHREADCTXEVENT_PREEMPTING]: Called with preemption enabled"); 96 96 break; 97 97 } … … 101 101 { 102 102 RTStrPrintf(pData->achResult, sizeof(pData->achResult), 103 "!tstR 0ThreadCtxHook[RTTHREADCTXEVENT_PREEMPTING]: Thread switched! Source=%RTnthrd Current=%RTnthrd.",103 "!tstRTR0ThreadCtxHook[RTTHREADCTXEVENT_PREEMPTING]: Thread switched! Source=%RTnthrd Current=%RTnthrd.", 104 104 pData->hSourceThread, hCurrentThread); 105 105 break; … … 110 110 { 111 111 RTStrPrintf(pData->achResult, sizeof(pData->achResult), 112 "!tstR 0ThreadCtxHook[RTTHREADCTXEVENT_PREEMPTING]: migrated uSourceCpuId=%RU32 uCurrentCpuId=%RU32",112 "!tstRTR0ThreadCtxHook[RTTHREADCTXEVENT_PREEMPTING]: migrated uSourceCpuId=%RU32 uCurrentCpuId=%RU32", 113 113 pData->uSourceCpuId, uCurrentCpuId); 114 114 break; … … 130 130 { 131 131 RTStrPrintf(pData->achResult, sizeof(pData->achResult), 132 "!tstR 0ThreadCtxHook[RTTHREADCTXEVENT_RESUMED]: Called before preempting callback was invoked.");132 "!tstRTR0ThreadCtxHook[RTTHREADCTXEVENT_RESUMED]: Called before preempting callback was invoked."); 133 133 break; 134 134 } … … 138 138 { 139 139 RTStrPrintf(pData->achResult, sizeof(pData->achResult), 140 "!tstR 0ThreadCtxHook[RTTHREADCTXEVENT_RESUMED]: Thread switched! Source=%RTnthrd Current=%RTnthrd.",140 "!tstRTR0ThreadCtxHook[RTTHREADCTXEVENT_RESUMED]: Thread switched! Source=%RTnthrd Current=%RTnthrd.", 141 141 pData->hSourceThread, hCurrentThread); 142 142 break; … … 162 162 * @param pReqHdr The request header. Input / Output. Optional. 163 163 */ 164 DECLEXPORT(int) TSTR 0ThreadPreemptionSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOperation,165 uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr)164 DECLEXPORT(int) TSTRTR0ThreadPreemptionSrvReqHandler(PSUPDRVSESSION pSession, uint32_t uOperation, 165 uint64_t u64Arg, PSUPR0SERVICEREQHDR pReqHdr) 166 166 { 167 167 NOREF(pSession); … … 345 345 pCtxData->uSourceCpuId = RTMpCpuId(); 346 346 347 rc = RTThreadCtxHooksRegister(hThreadCtx, &tstR 0ThreadCtxHook, pCtxData);347 rc = RTThreadCtxHooksRegister(hThreadCtx, &tstRTR0ThreadCtxHook, pCtxData); 348 348 if (RT_FAILURE(rc)) 349 349 {
Note:
See TracChangeset
for help on using the changeset viewer.