Changeset 21962 in vbox
- Timestamp:
- Aug 4, 2009 3:11:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r20866 r21962 147 147 static int supLoadModule(const char *pszFilename, const char *pszModule, const char *pszSrvReqHandler, void **ppvImageBase); 148 148 static DECLCALLBACK(int) supLoadModuleResolveImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser); 149 150 151 /** Touch a range of pages. */ 152 DECLINLINE(void) supR3TouchPages(void *pv, size_t cPages) 153 { 154 uint32_t volatile *pu32 = (uint32_t volatile *)pv; 155 while (cPages-- > 0) 156 { 157 ASMAtomicCmpXchgU32(pu32, 0, 0); 158 pu32 += PAGE_SIZE / sizeof(uint32_t); 159 } 160 } 149 161 150 162 … … 1060 1072 Assert(!(paPages[iPage].Phys & ~X86_PTE_PAE_PG_MASK)); 1061 1073 } 1074 #ifdef RT_OS_DARWIN /* HACK ALERT! */ 1075 supR3TouchPages(pReq->u.Out.pvR3, cPages); 1076 #endif 1062 1077 } 1063 1078 else if ( rc == VERR_NOT_SUPPORTED … … 1245 1260 if (pR0Ptr) 1246 1261 *pR0Ptr = Req.u.Out.pvR0; 1262 #ifdef RT_OS_DARWIN /* HACK ALERT! */ 1263 supR3TouchPages(Req.u.Out.pvR3, cPages); 1264 #endif 1247 1265 return Req.u.Out.pvR3; 1248 1266 } … … 1342 1360 Assert(paPages[iPage].Phys <= UINT32_C(0xfffff000)); 1343 1361 } 1362 #ifdef RT_OS_DARWIN /* HACK ALERT! */ 1363 supR3TouchPages(pReq->u.Out.pvR3, cPages); 1364 #endif 1344 1365 } 1345 1366 RTMemTmpFree(pReq);
Note:
See TracChangeset
for help on using the changeset viewer.