vbox的更動 25720 路徑 trunk/src/VBox/Runtime/r3/os2
- 時間撮記:
- 2010-1-11 下午01:57:09 (15 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp
r25717 r25720 148 148 149 149 150 RTDECL(int) RTSemEventMultiCreate(PRTSEMEVENTMULTI pEventMultiSem) 151 { 150 RTDECL(int) RTSemEventMultiCreate(PRTSEMEVENTMULTI phEventMultiSem) 151 { 152 return RTSemEventMultiCreateEx(phEventMultiSem, 0 /*fFlags*/, NIL_RTLOCKVALCLASS, NULL); 153 } 154 155 156 RTDECL(int) RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t fFlags, RTLOCKVALCLASS hClass, 157 const char *pszNameFmt, ...) 158 { 159 AssertReturn(!(fFlags & ~RTSEMEVENTMULTI_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER); 160 152 161 /* 153 162 * Create the semaphore. … … 158 167 if (!rc) 159 168 { 160 *pEventMultiSem = (RTSEMEVENTMULTI)(void *)hev; 161 return VINF_SUCCESS; 162 } 163 return RTErrConvertFromOS2(rc); 164 } 165 166 167 RTDECL(int) RTSemEventMultiDestroy(RTSEMEVENTMULTI EventMultiSem) 168 { 169 *phEventMultiSem = (RTSEMEVENTMULTI)(void *)hev; 170 return VINF_SUCCESS; 171 } 172 return RTErrConvertFromOS2(rc); 173 } 174 175 176 RTDECL(int) RTSemEventMultiDestroy(RTSEMEVENTMULTI hEventMultiSem) 177 { 178 if (hEventMultiSem == NIL_RTSEMEVENTMULTI) 179 return VINF_SUCCESS; 180 169 181 /* 170 182 * Close semaphore handle. 171 183 */ 172 int rc = DosCloseEventSem(SEM2HND( EventMultiSem));173 if (!rc) 174 return VINF_SUCCESS; 175 AssertMsgFailed(("Destroy EventMultiSem %p failed, rc=%d\n",EventMultiSem, rc));176 return RTErrConvertFromOS2(rc); 177 } 178 179 180 RTDECL(int) RTSemEventMultiSignal(RTSEMEVENTMULTI EventMultiSem)184 int rc = DosCloseEventSem(SEM2HND(hEventMultiSem)); 185 if (!rc) 186 return VINF_SUCCESS; 187 AssertMsgFailed(("Destroy hEventMultiSem %p failed, rc=%d\n", hEventMultiSem, rc)); 188 return RTErrConvertFromOS2(rc); 189 } 190 191 192 RTDECL(int) RTSemEventMultiSignal(RTSEMEVENTMULTI hEventMultiSem) 181 193 { 182 194 /* 183 195 * Signal the object. 184 196 */ 185 int rc = DosPostEventSem(SEM2HND( EventMultiSem));197 int rc = DosPostEventSem(SEM2HND(hEventMultiSem)); 186 198 switch (rc) 187 199 { … … 196 208 197 209 198 RTDECL(int) RTSemEventMultiReset(RTSEMEVENTMULTI EventMultiSem)210 RTDECL(int) RTSemEventMultiReset(RTSEMEVENTMULTI hEventMultiSem) 199 211 { 200 212 /* … … 202 214 */ 203 215 ULONG ulIgnore; 204 int rc = DosResetEventSem(SEM2HND( EventMultiSem), &ulIgnore);216 int rc = DosResetEventSem(SEM2HND(hEventMultiSem), &ulIgnore); 205 217 switch (rc) 206 218 { … … 214 226 215 227 216 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI EventMultiSem, unsigned cMillies)228 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsigned cMillies) 217 229 { 218 230 /* 219 231 * Wait for condition. 220 232 */ 221 int rc = DosWaitEventSem(SEM2HND( EventMultiSem), cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies);233 int rc = DosWaitEventSem(SEM2HND(hEventMultiSem), cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies); 222 234 switch (rc) 223 235 { … … 228 240 default: 229 241 { 230 AssertMsgFailed(("Wait on EventMultiSem %p failed, rc=%d\n",EventMultiSem, rc));242 AssertMsgFailed(("Wait on hEventMultiSem %p failed, rc=%d\n", hEventMultiSem, rc)); 231 243 return RTErrConvertFromOS2(rc); 232 244 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器