Index: /trunk/include/iprt/thread.h
===================================================================
--- /trunk/include/iprt/thread.h	(revision 20123)
+++ /trunk/include/iprt/thread.h	(revision 20124)
@@ -449,4 +449,11 @@
 
 /**
+ * Is RTThreadPreemptIsPending reliable?
+ *
+ * @returns true if pending, false if not.
+ */
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void);
+
+/**
  * Preemption state saved by RTThreadPreemptDisable and used by
  * RTThreadPreemptRestore to restore the previous state.
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 20123)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 20124)
@@ -261,5 +261,6 @@
 #endif
 /* RTThreadPreemptIsEnabled - not necessary */
-/* RTThreadPreemptIsPending  - not necessary */
+/* RTThreadPreemptIsPending - not necessary */
+/* RTThreadPreemptIsPendingTrusty - not necessary */
 /* RTThreadPreemptDisable - not necessary */
 DECLASM(void)   UNWIND_WRAP(RTThreadPreemptRestore)(RTTHREADPREEMPTSTATE pState);
@@ -421,4 +422,5 @@
     { "RTThreadPreemptIsEnabled",               (void *)RTThreadPreemptIsEnabled },
     { "RTThreadPreemptIsPending",               (void *)RTThreadPreemptIsPending },
+    { "RTThreadPreemptIsPendingTrusty",         (void *)RTThreadPreemptIsPendingTrusty },
     { "RTThreadPreemptDisable",                 (void *)RTThreadPreemptDisable },
     { "RTThreadPreemptRestore",                 (void *)UNWIND_WRAP(RTThreadPreemptRestore) },
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 20123)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 20124)
@@ -188,5 +188,5 @@
  *            and renaming the related IOCtls too.
  */
-#define SUPDRV_IOC_VERSION                              0x000c0003
+#define SUPDRV_IOC_VERSION                              0x000c0004
 
 /** SUP_IOCTL_COOKIE. */
Index: /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 20123)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 20124)
@@ -260,6 +260,6 @@
         strcpy(CookieReq.u.In.szMagic, SUPCOOKIE_MAGIC);
         CookieReq.u.In.u32ReqVersion = SUPDRV_IOC_VERSION;
-        const uint32_t MinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) == 0x000b0001
-                                  ? 0x000b0001
+        const uint32_t MinVersion = (SUPDRV_IOC_VERSION & 0xffff0000) >= 0x000c0004
+                                  ? 0x000c0004
                                   :  SUPDRV_IOC_VERSION & 0xffff0000;
         CookieReq.u.In.u32MinVersion = MinVersion;
Index: /trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm	(revision 20123)
+++ /trunk/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm	(revision 20124)
@@ -155,4 +155,5 @@
 ;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptIsEnabled - not necessary
 ;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptIsPending - not necessary
+;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptIsPendingTrusty - not necessary
 ;NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptDisable - not necessary
 NtWrapDyn2DrvFunctionWithAllRegParams  supdrvNtWrap, RTThreadPreemptRestore
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 20123)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 20124)
@@ -1284,4 +1284,5 @@
 	r0drv/generic/RTThreadPreemptIsEnabled-r0drv-generic.cpp \
 	r0drv/generic/RTThreadPreemptIsPending-r0drv-generic.cpp \
+	r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp \
 	r0drv/generic/RTThreadPreemptDisable-r0drv-generic.cpp \
 	r0drv/generic/RTThreadPreemptRestore-r0drv-generic.cpp \
Index: /trunk/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp	(revision 20123)
+++ /trunk/src/VBox/Runtime/r0drv/darwin/threadpreempt-r0drv-darwin.cpp	(revision 20124)
@@ -123,4 +123,11 @@
 
 
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* yes, we think thaat RTThreadPreemptIsPending is reliable... */
+    return true;
+}
+
+
 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
 {
Index: /trunk/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp	(revision 20124)
+++ /trunk/src/VBox/Runtime/r0drv/generic/RTThreadPreemptIsPendingTrusty-r0drv-generic.cpp	(revision 20124)
@@ -0,0 +1,42 @@
+/* $Id$ */
+/** @file
+ * IPRT - RTThreadPreemptIsPendingTrusty, Generic ring-0 driver implementation.
+ */
+
+/*
+ * Copyright (C) 2009 Sun Microsystems, Inc.
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include <iprt/thread.h>
+
+
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* no, RTThreadPreemptIsPending is not reliable. */
+    return false;
+}
+
Index: /trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c	(revision 20123)
+++ /trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c	(revision 20124)
@@ -102,4 +102,11 @@
 
 
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* yes, RTThreadPreemptIsPending is reliable. */
+    return true;
+}
+
+
 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
 {
Index: /trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp	(revision 20123)
+++ /trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp	(revision 20124)
@@ -148,4 +148,13 @@
 
 
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* RTThreadPreemptIsPending is only reliable of we've got both offsets and size. */
+    return offQuantumEnd    != 0
+        && cbQuantumEnd     != 0
+        && offDpcQueueDepth != 0;
+}
+
+
 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
 {
Index: /trunk/src/VBox/Runtime/r0drv/os2/thread-r0drv-os2.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/os2/thread-r0drv-os2.cpp	(revision 20123)
+++ /trunk/src/VBox/Runtime/r0drv/os2/thread-r0drv-os2.cpp	(revision 20124)
@@ -82,4 +82,11 @@
 
 
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* yes, RTThreadPreemptIsPending is reliable. */
+    return true;
+}
+
+
 RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
 {
Index: /trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c	(revision 20123)
+++ /trunk/src/VBox/Runtime/r0drv/solaris/thread-r0drv-solaris.c	(revision 20124)
@@ -122,4 +122,11 @@
 
 
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* yes, RTThreadPreemptIsPending is reliable. */
+    return true;
+}
+
+
 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
 {
Index: /trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c
===================================================================
--- /trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c	(revision 20123)
+++ /trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c	(revision 20124)
@@ -113,4 +113,11 @@
 
 
+RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
+{
+    /* yes, RTThreadPreemptIsPending is reliable. */
+    return true;
+}
+
+
 RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
 {
