Changeset 25655 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Jan 5, 2010 3:37:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/semevent-win.cpp
r25653 r25655 5 5 6 6 /* 7 * Copyright (C) 2006-20 09Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 135 135 136 136 137 RTDECL(int) RTSemEventSignal(RTSEMEVENT EventSem) 138 { 139 /* 140 * Validate input. 141 */ 142 struct RTSEMEVENTINTERNAL *pThis = EventSem; 143 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 144 AssertReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, VERR_INVALID_HANDLE); 145 146 #ifdef RTSEMEVENT_STRICT 147 if (pThis->fEverHadSignallers) 148 { 149 int rc9 = RTLockValidatorRecSharedCheckSignaller(&pThis->Signallers, NIL_RTTHREAD); 150 if (RT_FAILURE(rc9)) 151 return rc9; 152 } 153 #endif 154 155 /* 156 * Signal the object. 157 */ 158 if (SetEvent(pThis->hev)) 159 return VINF_SUCCESS; 160 DWORD dwErr = GetLastError(); 161 AssertMsgFailed(("Signaling EventSem %p failed, lasterr=%d\n", pThis, dwErr)); 162 return RTErrConvertFromWin32(dwErr); 163 } 164 165 137 166 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT EventSem, unsigned cMillies) 138 167 { … … 176 205 case WAIT_FAILED: 177 206 { 178 AssertMsgFailed(("Wait on EventSem %p failed, rc=%d lasterr=%d\n", EventSem, rc, GetLastError()));207 AssertMsgFailed(("Wait on EventSem %p failed, rc=%d lasterr=%d\n", pThis, rc, GetLastError())); 179 208 int rc2 = RTErrConvertFromWin32(GetLastError()); 180 209 if (rc2) … … 188 217 189 218 190 RTDECL(int) RTSemEventSignal(RTSEMEVENT EventSem)191 {192 /*193 * Validate input.194 */195 struct RTSEMEVENTINTERNAL *pThis = EventSem;196 AssertPtrReturn(pThis, VERR_INVALID_HANDLE);197 AssertReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, VERR_INVALID_HANDLE);198 199 #ifdef RTSEMEVENT_STRICT200 if (pThis->fEverHadSignallers)201 {202 int rc9 = RTLockValidatorRecSharedCheckSignaller(&pThis->Signallers, NIL_RTTHREAD);203 if (RT_FAILURE(rc9))204 return rc9;205 }206 #endif207 208 /*209 * Signal the object.210 */211 if (SetEvent(pThis->hev))212 return VINF_SUCCESS;213 DWORD dwErr = GetLastError();214 AssertMsgFailed(("Signaling EventSem %p failed, lasterr=%d\n", pThis, dwErr));215 return RTErrConvertFromWin32(dwErr);216 }217 218 219 219 RTDECL(void) RTSemEventSetSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread) 220 220 {
Note:
See TracChangeset
for help on using the changeset viewer.