Changeset 20912 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Jun 24, 2009 11:51:48 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49073
- Location:
- trunk/src/VBox/Runtime/r0drv/nt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp
r20883 r20912 136 136 } 137 137 138 #if 1 139 /* 140 * Wait for it. 141 * We're assuming interruptible waits should happen at UserMode level. 142 */ 143 NTSTATUS rcNt; 144 KPROCESSOR_MODE WaitMode = fInterruptible ? UserMode : KernelMode; 145 KWAIT_REASON WaitReason = Executive; /*fInterruptible ? Executive : UserRequest; ?*/ 146 if (cMillies == RT_INDEFINITE_WAIT) 147 rcNt = KeWaitForSingleObject(&pEventInt->Event, WaitReason, WaitMode, fInterruptible, NULL); 148 else 149 { 150 LARGE_INTEGER Timeout; 151 Timeout.QuadPart = -(int64_t)cMillies * 10000; 152 rcNt = KeWaitForSingleObject(&pEventInt->Event, WaitReason, WaitMode, fInterruptible, &Timeout); 153 } 154 #else 138 155 /* 139 156 * Wait for it. 140 157 * 141 * We default to UserMode here as the waits might be aborted due to process termination. 158 * We default to UserMode here as the waits might be aborted due to process termination. 142 159 * @todo As far as I can tell this is currently safe as all calls are made on behalf of user threads. 143 160 */ … … 156 173 RTMemFree(pTimeout); 157 174 } 175 #endif 158 176 switch (rcNt) 159 177 { -
trunk/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp
r20884 r20912 143 143 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, ("%p u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_PARAMETER); 144 144 145 #if 1 146 /* 147 * Wait for it. 148 * We're assuming interruptible waits should happen at UserMode level. 149 */ 150 NTSTATUS rcNt; 151 KPROCESSOR_MODE WaitMode = fInterruptible ? UserMode : KernelMode; 152 KWAIT_REASON WaitReason = Executive; /*fInterruptible ? Executive : UserRequest; ?*/ 153 if (cMillies == RT_INDEFINITE_WAIT) 154 rcNt = KeWaitForSingleObject(&pThis->Event, WaitReason, WaitMode, fInterruptible, NULL); 155 else 156 { 157 LARGE_INTEGER Timeout; 158 Timeout.QuadPart = -(int64_t)cMillies * 10000; 159 rcNt = KeWaitForSingleObject(&pThis->Event, WaitReason, WaitMode, fInterruptible, &Timeout); 160 } 161 #else 145 162 /* 146 163 * Wait for it. 147 164 * 148 * We default to UserMode here as the waits might be aborted due to process termination. 165 * We default to UserMode here as the waits might be aborted due to process termination. 149 166 * @todo As far as I can tell this is currently safe as all calls are made on behalf of user threads. 150 167 */ … … 163 180 RTMemFree(pTimeout); 164 181 } 182 #endif 165 183 switch (rcNt) 166 184 {
Note:
See TracChangeset
for help on using the changeset viewer.