Changeset 25721 in vbox for trunk/src/VBox/Runtime/r3/os2
- Timestamp:
- Jan 11, 2010 2:01:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp
r25720 r25721 247 247 248 248 249 RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread) 250 { 251 /** @todo implement RTSemEventMultiSetSignaller on OS/2 */ 252 } 253 254 255 RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread) 256 { 257 } 258 259 260 RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread) 261 { 262 } 263 249 264 250 265 … … 277 292 278 293 279 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX MutexSem) 280 { 294 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX hMutexSem) 295 { 296 if (hMutexSem == NIL_RTSEMMUTEX) 297 return VINF_SUCCESS; 298 281 299 /* 282 300 * Close semaphore handle. 283 301 */ 284 int rc = DosCloseMutexSem(SEM2HND( MutexSem));285 if (!rc) 286 return VINF_SUCCESS; 287 AssertMsgFailed(("Destroy MutexSem %p failed, rc=%d\n",MutexSem, rc));302 int rc = DosCloseMutexSem(SEM2HND(hMutexSem)); 303 if (!rc) 304 return VINF_SUCCESS; 305 AssertMsgFailed(("Destroy hMutexSem %p failed, rc=%d\n", hMutexSem, rc)); 288 306 return RTErrConvertFromOS2(rc); 289 307 } … … 309 327 310 328 #undef RTSemMutexRequestNoResume 311 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX MutexSem, unsigned cMillies)329 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsigned cMillies) 312 330 { 313 331 /* 314 332 * Lock mutex semaphore. 315 333 */ 316 int rc = DosRequestMutexSem(SEM2HND( MutexSem), cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies);334 int rc = DosRequestMutexSem(SEM2HND(hMutexSem), cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies); 317 335 switch (rc) 318 336 { … … 324 342 default: 325 343 { 326 AssertMsgFailed(("Wait on MutexSem %p failed, rc=%d\n",MutexSem, rc));344 AssertMsgFailed(("Wait on hMutexSem %p failed, rc=%d\n", hMutexSem, rc)); 327 345 return RTErrConvertFromOS2(rc); 328 346 } … … 330 348 } 331 349 332 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX MutexSem)350 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX hMutexSem) 333 351 { 334 352 /* 335 353 * Unlock mutex semaphore. 336 354 */ 337 int rc = DosReleaseMutexSem(SEM2HND( MutexSem));338 if (!rc) 339 return VINF_SUCCESS; 340 AssertMsgFailed(("Release MutexSem %p failed, rc=%d\n",MutexSem, rc));341 return RTErrConvertFromOS2(rc); 342 } 343 344 345 RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutex );355 int rc = DosReleaseMutexSem(SEM2HND(hMutexSem)); 356 if (!rc) 357 return VINF_SUCCESS; 358 AssertMsgFailed(("Release hMutexSem %p failed, rc=%d\n", hMutexSem, rc)); 359 return RTErrConvertFromOS2(rc); 360 } 361 362 363 RTDECL(bool) RTSemMutexIsOwned(RTSEMMUTEX hMutexSem); 346 364 { 347 365 /* … … 351 369 TID tid; 352 370 ULONG cRecursions; 353 int rc = DosQueryMutexSem(SEM2HND( MutexSem), &pid, &tid, &cRecursions);371 int rc = DosQueryMutexSem(SEM2HND(hMutexSem), &pid, &tid, &cRecursions); 354 372 if (!rc) 355 373 return cRecursions != 0; 356 AssertMsgFailed(("DosQueryMutexSem %p failed, rc=%d\n", MutexSem, rc));374 AssertMsgFailed(("DosQueryMutexSem %p failed, rc=%d\n", hMutexSem, rc)); 357 375 return rc == ERROR_SEM_OWNER_DIED; 358 376 } 359 377 360 361 RTDECL(void) RTSemEventMultiSetSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)362 {363 /** @todo implement RTSemEventMultiSetSignaller on OS/2 */364 }365 366 367 RTDECL(void) RTSemEventMultiAddSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)368 {369 }370 371 372 RTDECL(void) RTSemEventMultiRemoveSignaller(RTSEMEVENTMULTI hEventMultiSem, RTTHREAD hThread)373 {374 }375
Note:
See TracChangeset
for help on using the changeset viewer.