Index: trunk/src/VBox/Runtime/r0drv/freebsd/semevent-r0drv-freebsd.c
===================================================================
--- trunk/src/VBox/Runtime/r0drv/freebsd/semevent-r0drv-freebsd.c	(revision 20446)
+++ trunk/src/VBox/Runtime/r0drv/freebsd/semevent-r0drv-freebsd.c	(revision 20448)
@@ -76,5 +76,5 @@
         pEventInt->cWaking = 0;
         pEventInt->fSignaled = 0;
-        mtx_init(&pEventInt->Mtx, "IPRT Event Semaphore", NULL, MTX_SPIN);
+        mtx_init(&pEventInt->Mtx, "IPRT Event Semaphore", NULL, 0);
         *pEventSem = pEventInt;
         return VINF_SUCCESS;
@@ -94,5 +94,5 @@
                     VERR_INVALID_HANDLE);
 
-    mtx_lock_spin(&pEventInt->Mtx);
+    mtx_lock(&pEventInt->Mtx);
     ASMAtomicIncU32(&pEventInt->u32Magic); /* make the handle invalid */
     if (pEventInt->cWaiters > 0)
@@ -101,12 +101,12 @@
         ASMAtomicXchgU32(&pEventInt->cWaking, pEventInt->cWaking + pEventInt->cWaiters);
         wakeup(pEventInt);
-        mtx_unlock_spin(&pEventInt->Mtx);
+        mtx_unlock(&pEventInt->Mtx);
     }
     else if (pEventInt->cWaking)
         /* the last waking thread is gonna do the cleanup */
-        mtx_unlock_spin(&pEventInt->Mtx);
+        mtx_unlock(&pEventInt->Mtx);
     else
     {
-        mtx_unlock_spin(&pEventInt->Mtx);
+        mtx_unlock(&pEventInt->Mtx);
         mtx_destroy(&pEventInt->Mtx);
         RTMemFree(pEventInt);
@@ -125,5 +125,5 @@
                     VERR_INVALID_HANDLE);
 
-    mtx_lock_spin(&pEventInt->Mtx);
+    mtx_lock(&pEventInt->Mtx);
 
     if (pEventInt->cWaiters > 0)
@@ -136,5 +136,5 @@
         ASMAtomicXchgU8(&pEventInt->fSignaled, true);
 
-    mtx_unlock_spin(&pEventInt->Mtx);
+    mtx_unlock(&pEventInt->Mtx);
     return VINF_SUCCESS;
 }
@@ -150,5 +150,5 @@
                     VERR_INVALID_HANDLE);
 
-    mtx_lock_spin(&pEventInt->Mtx);
+    mtx_lock(&pEventInt->Mtx);
 
     if (pEventInt->fSignaled)
@@ -173,21 +173,15 @@
         ASMAtomicIncU32(&pEventInt->cWaiters);
 
-        mtx_unlock_spin(&pEventInt->Mtx);
-/** @todo r=bird: This doesn't handle cMillies == 0 correctly, it will assert
- *        and or sleep for ever according to r47861. (That's probably an old bug
- *        of my making.)
- *
- *        And it really looks like it's racing signalling on MP systems. (It
- *        *looks* like you leave the lock and then tries to go to sleep on a
- *        block id, someone spinning on the lock attempt to wake us up before we
- *        go to sleep. That's why the code was originally trying to use msleep
- *        here.). */
-        rc = tsleep(pEventInt,          /* block id */
-                    fInterruptible ? PZERO | PCATCH : PZERO,
-                    "iprtev",           /* max 6 chars */
-                    cMillies == RT_INDEFINITE_WAIT
-                    ? 0
-                    : tvtohz(&tv));
-        mtx_lock_spin(&pEventInt->Mtx);
+        /** @todo r=bird: This doesn't handle cMillies == 0 correctly, it will assert
+         *        and or sleep for ever according to r47861. (That's probably an old bug
+         *        of my making.)
+         */
+        rc = mtx_sleep(pEventInt,          /* block id */
+                       &pEventInt->Mtx,    /* mtx */
+                       fInterruptible ? PZERO | PCATCH : PZERO,
+                       "iprtev",           /* max 6 chars */
+                       cMillies == RT_INDEFINITE_WAIT
+                       ? 0
+                       : tvtohz(&tv));
 
         switch (rc)
@@ -207,5 +201,5 @@
                         /* The event was destroyed, as the last thread do the cleanup.
                            we don't actually know whether */
-                        mtx_unlock_spin(&pEventInt->Mtx);
+                        mtx_unlock(&pEventInt->Mtx);
                         mtx_destroy(&pEventInt->Mtx);
                         RTMemFree(pEventInt);
@@ -237,5 +231,5 @@
     }
 
-    mtx_unlock_spin(&pEventInt->Mtx);
+    mtx_unlock(&pEventInt->Mtx);
     return rc;
 }
