Index: /trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c	(revision 22769)
+++ /trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c	(revision 22770)
@@ -139,5 +139,16 @@
     RT_ASSERT_INTS_ON();
 
-    mutex_enter(&pEventInt->Mtx);
+    /*
+     * If we're in interrupt context we need to unpin the underlying current
+     * thread as this could lead to a deadlock (see #4259 for the full explanation)
+     */
+    int fAcquired = mutex_tryenter(&pEventInt->Mtx);
+    if (!fAcquired)
+    {
+        if (curthread->t_intr && getpil() < DISP_LEVEL)
+            swtch();
+
+        mutex_enter(&pEventInt->Mtx);
+    }
 
     if (pEventInt->cWaiters > 0)
Index: /trunk/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c	(revision 22769)
+++ /trunk/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c	(revision 22770)
@@ -138,5 +138,16 @@
     RT_ASSERT_INTS_ON();
 
-    mutex_enter(&pThis->Mtx);
+    /*
+     * If we're in interrupt context we need to unpin the underlying current
+     * thread as this could lead to a deadlock (see #4259 for the full explanation)
+     */
+    int fAcquired = mutex_tryenter(&pThis->Mtx);
+    if (!fAcquired)
+    {
+        if (curthread->t_intr && getpil() < DISP_LEVEL)
+            swtch();
+
+        mutex_enter(&pThis->Mtx);
+    }
 
     ASMAtomicXchgU8(&pThis->fSignaled, true);
