Changeset 20449 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Jun 9, 2009 10:23:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.