Changeset 20883 in vbox
- Timestamp:
- Jun 24, 2009 9:08:48 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49029
- Location:
- trunk/src/VBox/Runtime/r0drv/nt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp
r8245 r20883 138 138 /* 139 139 * Wait for it. 140 * 141 * We default to UserMode here as the waits might be aborted due to process termination. 142 * @todo As far as I can tell this is currently safe as all calls are made on behalf of user threads. 140 143 */ 141 144 NTSTATUS rcNt; 142 145 if (cMillies == RT_INDEFINITE_WAIT) 143 rcNt = KeWaitForSingleObject(&pEventInt->Event, Executive, KernelMode, fInterruptible, NULL);146 rcNt = KeWaitForSingleObject(&pEventInt->Event, Executive, UserMode, fInterruptible, NULL); 144 147 else 145 148 { 146 LARGE_INTEGER Timeout; 147 Timeout.QuadPart = -(int64_t)cMillies * 10000; 148 rcNt = KeWaitForSingleObject(&pEventInt->Event, Executive, KernelMode, fInterruptible, &Timeout); 149 /* Can't use the stack here as the wait is UserMode. */ 150 PLARGE_INTEGER pTimeout = (PLARGE_INTEGER)RTMemAlloc(sizeof(*pTimeout)); 151 if (!pTimeout) 152 return VERR_NO_MEMORY; 153 154 pTimeout->QuadPart = -(int64_t)cMillies * 10000; 155 rcNt = KeWaitForSingleObject(&pEventInt->Event, Executive, UserMode, fInterruptible, pTimeout); 156 RTMemFree(pTimeout); 149 157 } 150 158 switch (rcNt) -
trunk/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp
r8245 r20883 148 148 NTSTATUS rcNt; 149 149 if (cMillies == RT_INDEFINITE_WAIT) 150 rcNt = KeWaitForSingleObject(&pThis->Event, Executive, KernelMode, fInterruptible, NULL);150 rcNt = KeWaitForSingleObject(&pThis->Event, Executive, UserMode, fInterruptible, NULL); 151 151 else 152 152 { 153 LARGE_INTEGER Timeout; 154 Timeout.QuadPart = -(int64_t)cMillies * 10000; 155 rcNt = KeWaitForSingleObject(&pThis->Event, Executive, KernelMode, fInterruptible, &Timeout); 153 /* Can't use the stack here as the wait is UserMode. */ 154 PLARGE_INTEGER pTimeout = (PLARGE_INTEGER)RTMemAlloc(sizeof(*pTimeout)); 155 if (!pTimeout) 156 return VERR_NO_MEMORY; 157 158 pTimeout->QuadPart = -(int64_t)cMillies * 10000; 159 rcNt = KeWaitForSingleObject(&pThis->Event, Executive, UserMode, fInterruptible, pTimeout); 160 RTMemFree(pTimeout); 156 161 } 157 162 switch (rcNt)
Note:
See TracChangeset
for help on using the changeset viewer.