Index: /trunk/include/iprt/once.h
===================================================================
--- /trunk/include/iprt/once.h	(revision 19895)
+++ /trunk/include/iprt/once.h	(revision 19896)
@@ -92,4 +92,14 @@
 RTDECL(int) RTOnce(PRTONCE pOnce, PFNRTONCE pfnOnce, void *pvUser1, void *pvUser2);
 
+/**
+ * Resets an execute once variable.
+ *
+ * The caller is responsible for making sure there are no concurrent accesses to
+ * the execute once variable.
+ *
+ * @param   pOnce           Pointer to the execute once variable.
+ */
+RTDECL(void) RTOnceReset(PRTONCE pOnce);
+
 /** @} */
 
Index: /trunk/src/VBox/Runtime/common/misc/once.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/misc/once.cpp	(revision 19895)
+++ /trunk/src/VBox/Runtime/common/misc/once.cpp	(revision 19896)
@@ -160,2 +160,15 @@
 }
 
+
+RTDECL(void) RTOnceReset(PRTONCE pOnce)
+{
+    /* Cannot be done while busy! */
+    AssertPtr(pOnce);
+    Assert(pOnce->hEventMulti == NIL_RTSEMEVENTMULTI);
+    Assert(pOnce->iState != 1);
+
+    /* Do the same as RTONCE_INITIALIZER does. */
+    ASMAtomicWriteS32(&pOnce->rc, VERR_INTERNAL_ERROR);
+    ASMAtomicWriteS32(&pOnce->iState, -1);
+}
+
