Changeset 403 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Jan 28, 2007 8:45:05 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 17974
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/linux/sched-linux.cpp
r1 r403 124 124 * to only be lowering the priority. 125 125 */ 126 static const PROCPRIORITYTYPE g_aTypesLinuxFree[RTTHREADTYPE_ LAST] =126 static const PROCPRIORITYTYPE g_aTypesLinuxFree[RTTHREADTYPE_END] = 127 127 { 128 128 { RTTHREADTYPE_INVALID, -999999999 }, … … 143 143 * Deltas for a process in which we are restricted and can only lower the priority. 144 144 */ 145 static const PROCPRIORITYTYPE g_aTypesLinuxRestricted[RTTHREADTYPE_ LAST] =145 static const PROCPRIORITYTYPE g_aTypesLinuxRestricted[RTTHREADTYPE_END] = 146 146 { 147 147 { RTTHREADTYPE_INVALID, -999999999 }, … … 165 165 * to the process default of a thread created by a low priority thread. 166 166 */ 167 static const PROCPRIORITYTYPE g_aTypesLinuxFlat[RTTHREADTYPE_ LAST] =167 static const PROCPRIORITYTYPE g_aTypesLinuxFlat[RTTHREADTYPE_END] = 168 168 { 169 169 { RTTHREADTYPE_INVALID, -999999999 }, … … 465 465 int rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType) 466 466 { 467 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_ LAST);467 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); 468 468 469 469 /* … … 518 518 */ 519 519 int rc = VINF_SUCCESS; 520 int i = RTTHREADTYPE_ LAST;520 int i = RTTHREADTYPE_END; 521 521 while (--i > RTTHREADTYPE_INVALID) 522 522 { … … 598 598 { 599 599 /* sanity */ 600 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_ LAST);600 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); 601 601 Assert(enmType == g_pProcessPriority->paTypes[enmType].enmType); 602 602 Assert((pthread_t)pThread->Core.Key == pthread_self()); -
trunk/src/VBox/Runtime/r3/posix/sched-posix.cpp
r1 r403 122 122 * certain). 123 123 */ 124 static const PROCPRIORITYTYPE g_aTypesThread[RTTHREADTYPE_ LAST] =124 static const PROCPRIORITYTYPE g_aTypesThread[RTTHREADTYPE_END] = 125 125 { 126 126 { RTTHREADTYPE_INVALID, -999999999 }, … … 138 138 }; 139 139 140 static const PROCPRIORITYTYPE g_aTypesThreadFlat[RTTHREADTYPE_ LAST] =140 static const PROCPRIORITYTYPE g_aTypesThreadFlat[RTTHREADTYPE_END] = 141 141 { 142 142 { RTTHREADTYPE_INVALID, ~0 }, … … 184 184 * to only be lowering the priority. 185 185 */ 186 static const PROCPRIORITYTYPE g_aTypesUnixFree[RTTHREADTYPE_ LAST] =186 static const PROCPRIORITYTYPE g_aTypesUnixFree[RTTHREADTYPE_END] = 187 187 { 188 188 { RTTHREADTYPE_INVALID, -999999999 }, … … 204 204 * to only be lowering the priority. 205 205 */ 206 static const PROCPRIORITYTYPE g_aTypesUnixRestricted[RTTHREADTYPE_ LAST] =206 static const PROCPRIORITYTYPE g_aTypesUnixRestricted[RTTHREADTYPE_END] = 207 207 { 208 208 { RTTHREADTYPE_INVALID, -999999999 }, … … 224 224 * to only be lowering the priority. 225 225 */ 226 static const PROCPRIORITYTYPE g_aTypesUnixFlat[RTTHREADTYPE_ LAST] =226 static const PROCPRIORITYTYPE g_aTypesUnixFlat[RTTHREADTYPE_END] = 227 227 { 228 228 { RTTHREADTYPE_INVALID, -999999999 }, … … 506 506 int rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType) 507 507 { 508 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_ LAST);508 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); 509 509 510 510 /* … … 584 584 int iMin = sched_get_priority_min(SavedPriority.iPolicy); 585 585 pthread_t Self = pthread_self(); 586 for (int i = RTTHREADTYPE_INVALID + 1; i < RTTHREADTYPE_ LAST; i++)586 for (int i = RTTHREADTYPE_INVALID + 1; i < RTTHREADTYPE_END; i++) 587 587 { 588 588 struct sched_param SchedParam = SavedPriority.PthreadSchedParam; … … 607 607 case OSPRIOSUP_THREAD_LEVEL: 608 608 { 609 int i = RTTHREADTYPE_ LAST;609 int i = RTTHREADTYPE_END; 610 610 while (--i > RTTHREADTYPE_INVALID) 611 611 { … … 737 737 int rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType) 738 738 { 739 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_ LAST);739 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); 740 740 Assert(enmType == g_pProcessPriority->paTypes[enmType].enmType); 741 741 Assert((pthread_t)pThread->Core.Key == pthread_self()); -
trunk/src/VBox/Runtime/r3/win32/sched-win32.cpp
r1 r403 61 61 /** The Win32 thread priority. */ 62 62 DWORD dwThreadPriority; 63 } aTypes[RTTHREADTYPE_ LAST];63 } aTypes[RTTHREADTYPE_END]; 64 64 } PROCPRIORITY; 65 65 … … 254 254 int rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType) 255 255 { 256 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_ LAST);256 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); 257 257 return VINF_SUCCESS; 258 258 } … … 303 303 int rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType) 304 304 { 305 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_ LAST);305 Assert(enmType > RTTHREADTYPE_INVALID && enmType < RTTHREADTYPE_END); 306 306 AssertMsg(g_pProcessPriority && g_pProcessPriority->aTypes[enmType].enmType == enmType, 307 307 ("enmType=%d entry=%d\n", enmType, g_pProcessPriority->aTypes[enmType].enmType));
Note:
See TracChangeset
for help on using the changeset viewer.