Changeset 22553 in vbox
- Timestamp:
- Aug 28, 2009 2:10:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/darwin/sched-darwin.cpp
r22532 r22553 238 238 * If it doesn't match the default, select the closest one from the table. 239 239 */ 240 int iCurDiff= RT_ABS(g_pProcessPriority->aTypes[enmType].iBasePriority - iBasePriority);241 if ( iCurDiff)240 int offBest = RT_ABS(g_pProcessPriority->aTypes[enmType].iBasePriority - iBasePriority); 241 if (offBest) 242 242 { 243 243 const PROCPRIORITY *pProcessPriority = &g_aDefaultPriority; 244 244 for (unsigned i = 0; i < RT_ELEMENTS(g_aPriorities); i++) 245 245 { 246 /* @todo r=poetzsch: gcc warns here. iBasePriority in RT_ABS is the 247 * one which should be initialized not the one from line 234. So I 248 * guess gcc is right. */ 249 int iBasePriority = RT_ABS(g_aPriorities[i].aTypes[enmType].iBasePriority - iBasePriority); 250 if (iBasePriority < iCurDiff) 246 int off = RT_ABS(g_aPriorities[i].aTypes[enmType].iBasePriority - iBasePriority); 247 if (off < offBest) 251 248 { 252 249 g_pProcessPriority = &g_aPriorities[i]; 253 if (! iCurDiff)250 if (!off) 254 251 break; 255 iCurDiff = iBasePriority;252 offBest = off; 256 253 } 257 254 }
Note:
See TracChangeset
for help on using the changeset viewer.