Changeset 25721 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Jan 11, 2010 2:01:53 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/semaphore-r0drv-darwin.cpp
r25720 r25721 551 551 552 552 553 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX MutexSem)553 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX hMutexSem) 554 554 { 555 555 /* 556 556 * Validate input. 557 557 */ 558 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;558 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 559 559 if (!pThis) 560 560 return VERR_INVALID_PARAMETER; … … 577 577 578 578 579 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies)579 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies) 580 580 { 581 581 /* 582 582 * Validate input. 583 583 */ 584 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;584 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 585 585 if (!pThis) 586 586 return VERR_INVALID_PARAMETER; … … 627 627 628 628 629 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX MutexSem)629 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX hMutexSem) 630 630 { 631 631 /* 632 632 * Validate input. 633 633 */ 634 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;634 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 635 635 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 636 636 AssertMsg(pThis->u32Magic == RTSEMMUTEX_MAGIC, ("u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE); … … 677 677 678 678 679 RTDECL(int) RTSemFastMutexDestroy(RTSEMFASTMUTEX MutexSem)680 { 681 if ( MutexSem == NIL_RTSEMFASTMUTEX) /* don't bitch */679 RTDECL(int) RTSemFastMutexDestroy(RTSEMFASTMUTEX hMutexSem) 680 { 681 if (hMutexSem == NIL_RTSEMFASTMUTEX) /* don't bitch */ 682 682 return VERR_INVALID_PARAMETER; 683 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL) MutexSem;683 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL)hMutexSem; 684 684 AssertPtrReturn(pFastInt, VERR_INVALID_PARAMETER); 685 685 AssertMsgReturn(pFastInt->u32Magic == RTSEMFASTMUTEX_MAGIC, … … 698 698 699 699 700 RTDECL(int) RTSemFastMutexRequest(RTSEMFASTMUTEX MutexSem)701 { 702 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL) MutexSem;700 RTDECL(int) RTSemFastMutexRequest(RTSEMFASTMUTEX hMutexSem) 701 { 702 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL)hMutexSem; 703 703 AssertPtrReturn(pFastInt, VERR_INVALID_PARAMETER); 704 704 AssertMsgReturn(pFastInt->u32Magic == RTSEMFASTMUTEX_MAGIC, … … 711 711 712 712 713 RTDECL(int) RTSemFastMutexRelease(RTSEMFASTMUTEX MutexSem)714 { 715 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL) MutexSem;713 RTDECL(int) RTSemFastMutexRelease(RTSEMFASTMUTEX hMutexSem) 714 { 715 PRTSEMFASTMUTEXINTERNAL pFastInt = (PRTSEMFASTMUTEXINTERNAL)hMutexSem; 716 716 AssertPtrReturn(pFastInt, VERR_INVALID_PARAMETER); 717 717 AssertMsgReturn(pFastInt->u32Magic == RTSEMFASTMUTEX_MAGIC, -
trunk/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c
r25714 r25721 94 94 95 95 96 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX MutexSem)96 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX hMutexSem) 97 97 { 98 98 /* 99 99 * Validate input. 100 100 */ 101 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;101 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 102 102 if (pThis == NIL_RTSEMMUTEX) 103 103 return VINF_SUCCESS; … … 120 120 121 121 #undef RTSemMutexRequest 122 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies)122 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies) 123 123 { 124 124 int rc = VINF_SUCCESS; 125 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;125 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 126 126 127 127 /* … … 198 198 199 199 200 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX MutexSem)200 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX hMutexSem) 201 201 { 202 202 /* 203 203 * Validate input. 204 204 */ 205 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;205 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 206 206 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 207 207 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE); -
trunk/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp
r25714 r25721 93 93 94 94 95 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX MutexSem)95 RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX hMutexSem) 96 96 { 97 97 /* 98 98 * Validate input. 99 99 */ 100 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;100 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 101 101 if (pThis == NIL_RTSEMMUTEX) 102 102 return VINF_SUCCESS; … … 117 117 * 118 118 * @returns IPRT status code. 119 * @param MutexSem The mutex handle.119 * @param hMutexSem The mutex handle. 120 120 * @param cMillies The timeout. 121 121 * @param fInterruptible Whether it's interruptible … … 123 123 * (RTSemMutexRequest). 124 124 */ 125 static int rtSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies, BOOLEAN fInterruptible)125 static int rtSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies, BOOLEAN fInterruptible) 126 126 { 127 127 /* 128 128 * Validate input. 129 129 */ 130 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;130 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 131 131 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 132 132 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE); … … 174 174 175 175 #undef RTSemMutexRequest 176 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies)177 { 178 return rtSemMutexRequest( MutexSem, cMillies, FALSE /*fInterruptible*/);179 } 180 181 182 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX MutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)183 { 184 return RTSemMutexRequest( MutexSem, cMillies);176 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies) 177 { 178 return rtSemMutexRequest(hMutexSem, cMillies, FALSE /*fInterruptible*/); 179 } 180 181 182 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 183 { 184 return RTSemMutexRequest(hMutexSem, cMillies); 185 185 } 186 186 187 187 188 188 #undef RTSemMutexRequestNoResume 189 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX MutexSem, unsigned cMillies)190 { 191 return rtSemMutexRequest( MutexSem, cMillies, TRUE /*fInterruptible*/);192 } 193 194 195 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX MutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)196 { 197 return RTSemMutexRequestNoResume( MutexSem, cMillies);198 } 199 200 201 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX MutexSem)189 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsigned cMillies) 190 { 191 return rtSemMutexRequest(hMutexSem, cMillies, TRUE /*fInterruptible*/); 192 } 193 194 195 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 196 { 197 return RTSemMutexRequestNoResume(hMutexSem, cMillies); 198 } 199 200 201 RTDECL(int) RTSemMutexRelease(RTSEMMUTEX hMutexSem) 202 202 { 203 203 /* 204 204 * Validate input. 205 205 */ 206 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL) MutexSem;206 PRTSEMMUTEXINTERNAL pThis = (PRTSEMMUTEXINTERNAL)hMutexSem; 207 207 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 208 208 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE);
Note:
See TracChangeset
for help on using the changeset viewer.