Changeset 20449 in vbox
- Timestamp:
- Jun 9, 2009 10:23:42 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r20447 r20449 495 495 ## For experimenting with disabling preemption instead of interrupts 496 496 # when working VT-x/AMD-V in VMMR0. 497 ## @todo darwin, freebsd,os2. This should be made the default.498 if1of ($(KBUILD_TARGET), linux solaris windows )497 ## @todo darwin, os2. This should be made the default. 498 if1of ($(KBUILD_TARGET), linux solaris windows freebsd) 499 499 VBOX_WITH_VMMR0_DISABLE_PREEMPTION=1 500 500 endif -
trunk/src/VBox/Runtime/Makefile.kmk
r20360 r20449 521 521 generic/utf16locale-generic.cpp \ 522 522 generic/uuid-generic.cpp \ 523 generic/RTMpGetCurFrequency-generic.cpp \524 generic/RTMpGetMaxFrequency-generic.cpp \525 523 generic/RTMpCpuId-generic.cpp \ 526 524 generic/RTMpCpuIdFromSetIndex-generic.cpp \ … … 528 526 generic/RTMpIsCpuPossible-generic.cpp \ 529 527 generic/RTMpGetMaxCpuId-generic.cpp \ 530 generic/RTMpGetOnlineCount-generic.cpp \531 528 generic/RTMpGetOnlineSet-generic.cpp \ 532 529 generic/RTMpGetSet-generic.cpp \ 533 530 generic/RTMpIsCpuOnline-generic.cpp \ 534 531 generic/RTProcIsRunningByName-generic.cpp \ 532 r3/freebsd/mp-freebsd.cpp \ 535 533 r3/freebsd/alloc-freebsd.cpp \ 536 534 r3/freebsd/rtProcInitExePath-freebsd.cpp \ … … 1285 1283 generic/mppresent-generic.cpp \ 1286 1284 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \ 1287 r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp \1288 r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp \1289 r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp \1290 r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp \1291 r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp \1292 1285 r0drv/generic/mpnotification-r0drv-generic.cpp \ 1293 1286 r0drv/freebsd/alloc-r0drv-freebsd.c \ -
trunk/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
r18972 r20449 107 107 } 108 108 109 RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread) 110 { 111 Assert(hThread == NIL_RTTHREAD); 112 113 return curthread->td_critnest == 0; 114 } 115 116 117 RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread) 118 { 119 Assert(hThread == NIL_RTTHREAD); 120 121 return curthread->td_owepreempt == 1; 122 } 123 124 RTDECL(bool) RTThreadPreemptIsPendingTrusty(void) 125 { 126 /* yes, RTThreadPreemptIsPending is reliable. */ 127 return true; 128 } 129 130 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState) 131 { 132 AssertPtr(pState); 133 Assert(pState->uchDummy != 42); 134 pState->uchDummy = 42; 135 136 critical_enter(); 137 } 138 139 140 RTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState) 141 { 142 AssertPtr(pState); 143 Assert(pState->uchDummy == 42); 144 pState->uchDummy = 0; 145 146 critical_exit(); 147 } 148
Note:
See TracChangeset
for help on using the changeset viewer.