Index: trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp	(revision 25467)
+++ trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp	(revision 25478)
@@ -155,5 +155,5 @@
 
 
-DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies, RTSEMMUTEX_STRICT_POS_DECL)
+DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX MutexSem, unsigned cMillies, PCRTLOCKVALIDATORSRCPOS pSrcPos)
 {
     /*
@@ -166,5 +166,5 @@
 #ifdef RTSEMMUTEX_STRICT
     RTTHREAD hThreadSelf = RTThreadSelfAutoAdopt();
-    RTLockValidatorCheckOrder(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS);
+    RTLockValidatorCheckOrder(&pThis->ValidatorRec, hThreadSelf, pSrcPos);
 #endif
 
@@ -190,10 +190,9 @@
 #ifdef RTSEMMUTEX_STRICT
         int rc9 = RTLockValidatorCheckBlocking(&pThis->ValidatorRec, hThreadSelf,
-                                               RTTHREADSTATE_MUTEX, true, uId, RT_SRC_POS_ARGS);
+                                               RTTHREADSTATE_MUTEX, true, pSrcPos);
         if (RT_FAILURE(rc9))
             return rc9;
-#else
+#endif
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX);
-#endif
     }
 
@@ -248,5 +247,5 @@
     ASMAtomicWriteU32(&pThis->cNesting, 1);
 #ifdef RTSEMMUTEX_STRICT
-    RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS);
+    RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, pSrcPos);
 #endif
 
@@ -258,7 +257,8 @@
 {
 #ifndef RTSEMMUTEX_STRICT
-    return rtSemMutexRequest(MutexSem, cMillies, RTSEMMUTEX_STRICT_POS_ARGS);
+    return rtSemMutexRequest(MutexSem, cMillies, NULL);
 #else
-    return RTSemMutexRequestDebug(MutexSem, cMillies, (uintptr_t)ASMReturnAddress(), RT_SRC_POS);
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
+    return rtSemMutexRequest(MutexSem, cMillies, &SrcPos);
 #endif
 }
@@ -267,19 +267,17 @@
 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX MutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
-#ifdef RTSEMMUTEX_STRICT
-    return rtSemMutexRequest(MutexSem, cMillies, RTSEMMUTEX_STRICT_POS_ARGS);
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
+    return rtSemMutexRequest(MutexSem, cMillies, &SrcPos);
+}
+
+
+RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX MutexSem, unsigned cMillies)
+{
+    /* (EINTR isn't returned by the wait functions we're using.) */
+#ifndef RTSEMMUTEX_STRICT
+    return rtSemMutexRequest(MutexSem, cMillies, NULL);
 #else
-    return RTSemMutexRequest(MutexSem, cMillies);
-#endif
-}
-
-
-RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX MutexSem, unsigned cMillies)
-{
-    /* EINTR isn't returned by the wait functions we're using. */
-#ifndef RTSEMMUTEX_STRICT
-    return RTSemMutexRequest(MutexSem, cMillies);
-#else
-    return RTSemMutexRequestDebug(MutexSem, cMillies, (uintptr_t)ASMReturnAddress(), RT_SRC_POS);
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
+    return rtSemMutexRequest(MutexSem, cMillies, &SrcPos);
 #endif
 }
@@ -288,10 +286,6 @@
 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX MutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
-    /* EINTR isn't returned by the wait functions we're using. */
-#ifdef RTSEMMUTEX_STRICT
-    return RTSemMutexRequestDebug(MutexSem, cMillies, RTSEMMUTEX_STRICT_POS_ARGS);
-#else
-    return RTSemMutexRequest(MutexSem, cMillies);
-#endif
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
+    return rtSemMutexRequest(MutexSem, cMillies, &SrcPos);
 }
 
Index: trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp
===================================================================
--- trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp	(revision 25467)
+++ trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp	(revision 25478)
@@ -315,5 +315,5 @@
 
 
-DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW RWSem, unsigned cMillies, RTSEMRW_STRICT_POS_DECL)
+DECL_FORCE_INLINE(int) rtSemRWRequestWrite(RTSEMRW RWSem, unsigned cMillies, PCRTLOCKVALIDATORSRCPOS pSrcPos)
 {
     /*
@@ -327,5 +327,5 @@
 #ifdef RTSEMRW_STRICT
     RTTHREAD hThreadSelf = RTThreadSelfAutoAdopt();
-    RTLockValidatorCheckOrder(&pThis->ValidatorRec, hThreadSelf, RTSEMRW_STRICT_POS_ARGS);
+    RTLockValidatorCheckOrder(&pThis->ValidatorRec, hThreadSelf, pSrcPos);
 #endif
 
@@ -339,5 +339,5 @@
     {
 #ifdef RTSEMRW_STRICT
-        int rc9 = RTLockValidatorRecordRecursion(&pThis->ValidatorRec, RTSEMRW_STRICT_POS_ARGS);
+        int rc9 = RTLockValidatorRecordRecursion(&pThis->ValidatorRec, pSrcPos);
         if (RT_FAILURE(rc9))
             return rc9;
@@ -357,10 +357,9 @@
     {
 #ifdef RTSEMRW_STRICT
-        int rc9 = RTLockValidatorCheckBlocking(&pThis->ValidatorRec, hThreadSelf, RTTHREADSTATE_RW_WRITE, true, uId, RT_SRC_POS_ARGS);
+        int rc9 = RTLockValidatorCheckBlocking(&pThis->ValidatorRec, hThreadSelf, RTTHREADSTATE_RW_WRITE, true, pSrcPos);
         if (RT_FAILURE(rc9))
             return rc9;
-#else
+#endif
         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_RW_WRITE);
-#endif
     }
 
@@ -412,5 +411,5 @@
     pThis->cWrites = 1;
 #ifdef RTSEMRW_STRICT
-    RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMRW_STRICT_POS_ARGS);
+    RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, pSrcPos);
 #endif
     return VINF_SUCCESS;
@@ -421,7 +420,8 @@
 {
 #ifndef RTSEMRW_STRICT
-    return rtSemRWRequestWrite(RWSem, cMillies, RTSEMRW_STRICT_POS_ARGS);
+    return rtSemRWRequestWrite(RWSem, cMillies, NULL);
 #else
-    return RTSemRWRequestWriteDebug(RWSem, cMillies, (uintptr_t)ASMReturnAddress(), RT_SRC_POS);
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
+    return rtSemRWRequestWrite(RWSem, cMillies, &SrcPos);
 #endif
 }
@@ -430,9 +430,6 @@
 RTDECL(int) RTSemRWRequestWriteDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
-#ifdef RTSEMRW_STRICT
-    return rtSemRWRequestWrite(RWSem, cMillies, RTSEMRW_STRICT_POS_ARGS);
-#else
-    return RTSemRWRequestWrite(RWSem, cMillies);
-#endif
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
+    return rtSemRWRequestWrite(RWSem, cMillies, &SrcPos);
 }
 
@@ -442,7 +439,8 @@
     /* EINTR isn't returned by the wait functions we're using. */
 #ifndef RTSEMRW_STRICT
-    return RTSemRWRequestWrite(RWSem, cMillies);
+    return rtSemRWRequestWrite(RWSem, cMillies, NULL);
 #else
-    return RTSemRWRequestWriteDebug(RWSem, cMillies, (uintptr_t)ASMReturnAddress(), RT_SRC_POS);
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
+    return rtSemRWRequestWrite(RWSem, cMillies, &SrcPos);
 #endif
 }
@@ -452,9 +450,6 @@
 {
     /* EINTR isn't returned by the wait functions we're using. */
-#ifdef RTSEMRW_STRICT
-    return RTSemRWRequestWriteDebug(RWSem, cMillies, RTSEMRW_STRICT_POS_ARGS);
-#else
-    return RTSemRWRequestWrite(RWSem, cMillies);
-#endif
+    RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
+    return rtSemRWRequestWrite(RWSem, cMillies, &SrcPos);
 }
 
