Index: /trunk/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h	(revision 33735)
+++ /trunk/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h	(revision 33736)
@@ -70,6 +70,8 @@
     /** The thread to wake up. */
     kthread_t      *pThread;
+#if 0 /* @bugref{5342} */
     /** Cylic timer ID (used by the timeout callback). */
     cyclic_id_t     idCy;
+#endif
     /** The mutex associated with the condition variable wait. */
     void volatile  *pvMtx;
@@ -133,6 +135,7 @@
     {
         pWait->fIndefinite      = false;
-        if (   (fFlags & (RTSEMWAIT_FLAGS_NANOSECS | RTSEMWAIT_FLAGS_ABSOLUTE))
-            || pWait->cNsRelTimeout < UINT32_C(1000000000) / 100 /*Hz*/ * 4)
+        if (  (   (fFlags & (RTSEMWAIT_FLAGS_NANOSECS | RTSEMWAIT_FLAGS_ABSOLUTE))
+               || pWait->cNsRelTimeout < UINT32_C(1000000000) / 100 /*Hz*/ * 4)
+            && g_pfnrtR0Sol_timeout_generic != NULL /* See @bugref{5342} */)
             pWait->fHighRes     = true;
         else
@@ -163,5 +166,7 @@
     pWait->pThread          = curthread;
     pWait->pvMtx            = NULL;
+#if 0 /* @bugref{5342} */
     pWait->idCy             = CYCLIC_NONE;
+#endif
 
     return VINF_SUCCESS;
@@ -169,4 +174,5 @@
 
 
+#if 0 /* @bugref{5342} */
 /**
  * Cyclic timeout callback that sets the timeout indicator and wakes up the
@@ -185,4 +191,7 @@
            before we wake it up.
            Note: Trying to take the cpu_lock here doesn't work. */
+        /** @todo LOCK ORDER INVERSION (pMtx & cpu_lock when arming the timer, here it's inverted).
+         *  Possible fix: Use the thread lock for sleep/wakeup race prevention
+         *  instead of the mutex associated with the cv/event. */
         mutex_enter(pMtx);
         if (mutex_owner(&cpu_lock) == curthread)
@@ -196,4 +205,5 @@
     }
 }
+#endif
 
 
@@ -247,5 +257,7 @@
         if (pWait->fHighRes)
         {
+#if 0 /* @bugref{5342} */
             if (g_pfnrtR0Sol_timeout_generic != NULL)
+#endif
             {
                 /*
@@ -257,4 +269,5 @@
                                                       CALLOUT_FLAG_ABSOLUTE);
             }
+#if 0 /* @bugref{5342} */
             else
             {
@@ -276,4 +289,5 @@
                 mutex_exit(&cpu_lock);
             }
+#endif
         }
         else
@@ -318,6 +332,9 @@
         if (pWait->fHighRes)
         {
+#if 0 /* @bugref{5342} */
             if (g_pfnrtR0Sol_timeout_generic != NULL)
+#endif
                 g_pfnrtR0Sol_untimeout_generic(u.idCo, 0 /*nowait*/);
+#if 0 /* @bugref{5342} */
             else
             {
@@ -330,4 +347,5 @@
                 mutex_exit(&cpu_lock);
             }
+#endif
         }
         else
