Index: /trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk	(revision 50335)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk	(revision 50336)
@@ -62,5 +62,4 @@
 	seamless-host.cpp \
 	seamless-x11.cpp \
-	thread.cpp \
 	display.cpp \
 	hostversion.cpp
@@ -112,6 +111,5 @@
            testcase/tstSeamlessX11.cpp \
            seamless-host.cpp \
-           seamless-x11.cpp \
-           thread.cpp
+           seamless-x11.cpp
    tstSeamlessX11_LIBPATH = \
            $(VBOX_LIBPATH_X11)
Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless-host.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless-host.cpp	(revision 50335)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless-host.cpp	(revision 50336)
@@ -25,4 +25,5 @@
 
 #include "seamless-host.h"
+#include "seamless-x11.h"
 
 /**
@@ -35,5 +36,5 @@
 
     LogRelFlowFunc(("\n"));
-    if (mRunning)  /* Assertion */
+    if (mThread)  /* Assertion */
     {
         LogRel(("VBoxClient: seamless service started twice!\n"));
@@ -49,10 +50,8 @@
     {
         LogRel(("VBoxClient: enabled seamless capability on host.\n"));
-        rc = mThread.start();
-        if (RT_SUCCESS(rc))
-        {
-            mRunning = true;
-        }
-        else
+        rc = RTThreadCreate(&mThread, threadFunction, this, 0,
+                            RTTHREADTYPE_MSG_PUMP, RTTHREADFLAGS_WAITABLE,
+                            "Host events");
+        if (RT_FAILURE(rc))
         {
             LogRel(("VBoxClient: failed to start seamless event thread, rc=%Rrc.  Disabled seamless capability on host again.\n", rc));
@@ -71,14 +70,13 @@
 void VBoxGuestSeamlessHost::stop(RTMSINTERVAL cMillies /* = RT_INDEFINITE_WAIT */)
 {
-    LogRelFlowFunc(("returning\n"));
-    if (!mRunning)  /* Assertion */
-    {
+    LogRelFlowFunc(("\n"));
+    if (!mThread)  /* Assertion */
         LogRel(("VBoxClient: tried to stop seamless service which is not running!\n"));
-        return;
-    }
-    mThread.stop(cMillies, 0);
+    else
+        stopThread(cMillies);
+    if (mX11MonitorRTThread)
+        stopX11Thread();
     VbglR3CtlFilterMask(0, VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST);
     VbglR3SeamlessSetCap(false);
-    mRunning = false;
     LogRelFlowFunc(("returning\n"));
 }
@@ -106,5 +104,10 @@
 #endif
                 mState = ENABLE;
-                mX11MonitorThread->start();
+                mX11ThreadStopping = false;
+                /** @todo Do something on failure, like bail out. */
+                if (RT_FAILURE(RTThreadCreate(&mX11MonitorRTThread,
+                               x11ThreadFunction, this, 0, RTTHREADTYPE_MSG_PUMP,
+                               RTTHREADFLAGS_WAITABLE, "X11 events")))
+                    LogRelFunc(("Warning: failed to start X11 monitor thread (VBoxClient).\n"));
                 break;
             case VMMDev_Seamless_Host_Window:
@@ -120,5 +123,8 @@
 #endif
                 mState = DISABLE;
-                mX11MonitorThread->stop(RT_INDEFINITE_WAIT, 0);
+                if (mX11MonitorRTThread)
+                    stopX11Thread();
+                else
+                    LogRelThisFunc(("Attempted to stop X11 monitor thread which is not running (VBoxClient)!\n"));
         }
     }
@@ -146,26 +152,27 @@
 }
 
-/**
- * The actual thread function.
- *
- * @returns iprt status code as thread return value
- * @param pParent the VBoxGuestThread running this thread function
- */
-int VBoxGuestSeamlessHostThread::threadFunction(VBoxGuestThread *pThread)
-{
-    LogRelFlowFunc(("\n"));
-    if (0 != mHost)
-    {
-        mThread = pThread;
-        while (!mThread->isStopping())
-        {
-            if (RT_FAILURE(mHost->nextEvent()) && !mThread->isStopping())
+
+/**
+ * The actual event thread function.
+ */
+int VBoxGuestSeamlessHost::threadFunction(RTTHREAD self, void *pvUser)
+{
+    VBoxGuestSeamlessHost *pHost = (VBoxGuestSeamlessHost *)pvUser;
+
+    LogRelFlowFunc(("\n"));
+    pHost->mThreadRunning = true;
+    if (0 != pHost)
+    {
+        while (!pHost->mThreadStopping)
+        {
+            if (RT_FAILURE(pHost->nextEvent()) && !pHost->mThreadStopping)
             {
                 /* If we are not stopping, sleep for a bit to avoid using up too
                     much CPU while retrying. */
-                mThread->yield();
+                RTThreadYield();
             }
         }
     }
+    pHost->mThreadRunning = false;
     LogRelFlowFunc(("returning VINF_SUCCESS\n"));
     return VINF_SUCCESS;
@@ -173,23 +180,68 @@
 
 /**
+ * Send a signal to the thread that it should exit
+ */
+void VBoxGuestSeamlessHost::stopThread(RTMSINTERVAL cMillies)
+{
+    int rc;
+
+    LogRelFlowFunc(("\n"));
+    /**
+     * @todo is this reasonable?  If the thread is in the event loop then the cancelEvent()
+     *       will cause it to exit.  If it enters or exits the event loop it will also
+     *       notice that we wish it to exit.  And if it is somewhere in-between, the
+     *       yield() should give it time to get to one of places mentioned above.
+     */
+    mThreadStopping = true;
+    for (int i = 0; (i < 5) && mThreadRunning; ++i)
+    {
+        cancelEvent();
+        RTThreadYield();
+    }
+    rc = RTThreadWait(mThread, RT_INDEFINITE_WAIT, NULL);
+    if (RT_SUCCESS(rc))
+        mThread = NIL_RTTHREAD;
+    else
+        LogRelThisFunc(("Failed to stop seamless event thread, rc=%Rrc!\n",
+                        rc));
+    LogRelFlowFunc(("returning\n"));
+}
+
+/**
+ * The actual X11 event thread function.
+ */
+int VBoxGuestSeamlessHost::x11ThreadFunction(RTTHREAD self, void *pvUser)
+{
+    VBoxGuestSeamlessHost *pHost = (VBoxGuestSeamlessHost *)pvUser;
+    int rc = VINF_SUCCESS;
+
+    LogRelFlowFunc(("\n"));
+    rc = pHost->mX11Monitor->start();
+    if (RT_SUCCESS(rc))
+    {
+        while (!pHost->mX11ThreadStopping)
+        {
+            pHost->mX11Monitor->nextEvent();
+        }
+        pHost->mX11Monitor->stop();
+    }
+    LogRelFlowFunc(("returning %Rrc\n", rc));
+    return rc;
+}
+
+/**
  * Send a signal to the thread function that it should exit
  */
-void VBoxGuestSeamlessHostThread::stop(void)
-{
-    LogRelFlowFunc(("\n"));
-    if (0 != mHost)
-    {
-        /**
-         * @todo is this reasonable?  If the thread is in the event loop then the cancelEvent()
-         *       will cause it to exit.  If it enters or exits the event loop it will also
-         *       notice that we wish it to exit.  And if it is somewhere in-between, the
-         *       yield() should give it time to get to one of places mentioned above.
-         */
-        for (int i = 0; (i < 5) && mThread->isRunning(); ++i)
-        {
-            mHost->cancelEvent();
-            mThread->yield();
-        }
-    }
-    LogRelFlowFunc(("returning\n"));
-}
+void VBoxGuestSeamlessHost::stopX11Thread(void)
+{
+    int rc;
+
+    mX11ThreadStopping = true;
+    mX11Monitor->interruptEvent();
+    rc = RTThreadWait(mX11MonitorRTThread, RT_INDEFINITE_WAIT, NULL);
+    if (RT_SUCCESS(rc))
+        mX11MonitorRTThread = NIL_RTTHREAD;
+    else
+        LogRelThisFunc(("Failed to stop X11 monitor thread, rc=%Rrc!\n",
+                        rc));
+}
Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless-host.h
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless-host.h	(revision 50335)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless-host.h	(revision 50336)
@@ -19,46 +19,10 @@
 # define __Additions_client_seamless_host_h
 
+#include <iprt/thread.h>
+
 #include <VBox/log.h>
 #include <VBox/VBoxGuestLib.h>      /* for the R3 guest library functions  */
 
-#include "thread.h"                 /* for VBoxGuestThread */
-
-class VBoxGuestSeamlessHost;
-
-/**
- * Host event (i.e. enter or leave seamless mode) thread function for the main
- * seamless class
- */
-class VBoxGuestSeamlessHostThread : public VBoxGuestThreadFunction
-{
-private:
-    // Copying or assigning a thread object is not sensible
-    VBoxGuestSeamlessHostThread(const VBoxGuestSeamlessHostThread&);
-    VBoxGuestSeamlessHostThread& operator=(const VBoxGuestSeamlessHostThread&);
-
-    // Private member variables
-    /** The host proxy object */
-    VBoxGuestSeamlessHost *mHost;
-
-    /** The thread object running us. */
-    VBoxGuestThread *mThread;
-public:
-    VBoxGuestSeamlessHostThread(VBoxGuestSeamlessHost *pHost)
-    {
-        mHost = pHost;
-    }
-    virtual ~VBoxGuestSeamlessHostThread(void) {}
-    /**
-      * The actual thread function.
-      *
-      * @returns iprt status code as thread return value
-      * @param pParent the VBoxGuestThread running this thread function
-      */
-    virtual int threadFunction(VBoxGuestThread *pThread);
-    /**
-     * Send a signal to the thread function that it should exit
-     */
-    virtual void stop(void);
-};
+class VBoxGuestSeamlessX11;
 
 /**
@@ -78,5 +42,4 @@
 class VBoxGuestSeamlessHost : public VBoxGuestSeamlessHostInt
 {
-    friend class VBoxGuestSeamlessHostThread;
 public:
     /** Events which can be reported by this class */
@@ -98,11 +61,15 @@
     /** Thread to start and stop when we enter and leave seamless mode which
      *  monitors X11 windows in the guest. */
-    VBoxGuestThread *mX11MonitorThread;
-    /** Host seamless event (i.e. enter and leave) thread function. */
-    VBoxGuestSeamlessHostThread mThreadFunction;
+    RTTHREAD mX11MonitorRTThread;
+    /** X11 event monitor class */
+    VBoxGuestSeamlessX11 *mX11Monitor;
+    /** Should the X11 monitor thread be stopping? */
+    volatile bool mX11ThreadStopping;
     /** Host seamless event thread. */
-    VBoxGuestThread mThread;
-    /** Is the service running? */
-    bool mRunning;
+    RTTHREAD mThread;
+    /** Is the thread running? */
+    volatile bool mThreadRunning;
+    /** Should the thread be stopping? */
+    volatile bool mThreadStopping;
     /** Last request issued by the host. */
     meEvent mState;
@@ -120,21 +87,34 @@
      */
     void cancelEvent(void) { VbglR3InterruptEventWaits(); }
+    
+    /** Thread function to query seamless activation and deactivation events
+     *  from the host. */
+    static DECLCALLBACK(int) threadFunction(RTTHREAD self, void *pvUser);
+
+    /** Helper to stop the event query thread again. */
+    void stopThread(RTMSINTERVAL cMillies);
+
+    /** Thread function to monitor X11 window configuration changes. */
+    static DECLCALLBACK(int) x11ThreadFunction(RTTHREAD self, void *pvUser);
+
+    /** Helper to stop the X11 monitor thread again. */
+    void stopX11Thread(void);
 
 public:
     /**
      * Initialise the guest and ensure that it is capable of handling seamless mode
-     * @param   pX11MonitorThread Thread class to monitor guest windows.
+     * @param   pX11Monitor Object to monitor X11 guest windows.
      *
      * @returns iprt status code
      */
-    int init(VBoxGuestThread *pX11MonitorThread)
+    int init(VBoxGuestSeamlessX11 *pX11Monitor)
     {
         LogRelFlowFunc(("\n"));
-        if (mX11MonitorThread != 0)  /* Assertion */
+        if (mX11Monitor != NULL)  /* Assertion */
         {
             LogRel(("VBoxClient: ERROR: attempt to initialise seamless host object twice!\n"));
             return VERR_INTERNAL_ERROR;
         }
-        mX11MonitorThread = pX11MonitorThread;
+        mX11Monitor = pX11Monitor;
         LogRelFlowFunc(("returning VINF_SUCCESS\n"));
         return VINF_SUCCESS;
@@ -161,10 +141,12 @@
     virtual void notify(RTRECT *pRects, size_t cRects);
 
-    VBoxGuestSeamlessHost(void) : mThreadFunction(this),
-                                  mThread(&mThreadFunction, 0, RTTHREADTYPE_MSG_PUMP,
-                                  RTTHREADFLAGS_WAITABLE, "Host events")
+    VBoxGuestSeamlessHost(void)
     {
-        mX11MonitorThread = 0;
-        mRunning = false;
+        mX11MonitorRTThread = NIL_RTTHREAD;
+        mX11Monitor = NULL;
+        mX11ThreadStopping = false;
+        mThread = NIL_RTTHREAD;
+        mThreadRunning = false;
+        mThreadStopping = false;
         mState = NONE;
     }
@@ -173,5 +155,5 @@
     {
         LogRelFlowFunc(("\n"));
-        if (mRunning)  /* Assertion */
+        if (mThread)  /* Assertion */
         {
             LogRel(("VBoxClient: seamless host object still running!  Stopping...\n"));
Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h	(revision 50335)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h	(revision 50336)
@@ -147,6 +147,4 @@
 };
 
-class VBoxGuestSeamlessX11;
-
 class VBoxGuestSeamlessX11
 {
Index: /trunk/src/VBox/Additions/x11/VBoxClient/seamless.h
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/seamless.h	(revision 50335)
+++ /trunk/src/VBox/Additions/x11/VBoxClient/seamless.h	(revision 50336)
@@ -24,50 +24,4 @@
 #include "seamless-x11.h"
 
-/** Thread function class for VBoxGuestSeamlessX11. */
-class VBoxGuestSeamlessGuestThread: public VBoxGuestThreadFunction
-{
-private:
-    /** The guest class "owning" us. */
-    VBoxGuestSeamlessX11 *mGuest;
-    /** Should we exit the thread? */
-    bool mExit;
-
-    // Copying or assigning a thread object is not sensible
-    VBoxGuestSeamlessGuestThread(const VBoxGuestSeamlessGuestThread&);
-    VBoxGuestSeamlessGuestThread& operator=(const VBoxGuestSeamlessGuestThread&);
-
-public:
-    VBoxGuestSeamlessGuestThread(VBoxGuestSeamlessX11 *pGuest)
-    { mGuest = pGuest; mExit = false; }
-    virtual ~VBoxGuestSeamlessGuestThread(void) {}
-    /**
-      * The actual thread function.
-      *
-      * @returns iprt status code as thread return value
-      * @param pParent the VBoxGuestThread running this thread function
-      */
-    virtual int threadFunction(VBoxGuestThread *pThread)
-    {
-        int rc = VINF_SUCCESS;
-
-        LogRelFlowFunc(("\n"));
-        rc = mGuest->start();
-        if (RT_SUCCESS(rc))
-        {
-            while (!pThread->isStopping())
-            {
-                mGuest->nextEvent();
-            }
-            mGuest->stop();
-        }
-        LogRelFlowFunc(("returning %Rrc\n", rc));
-        return rc;
-    }
-    /**
-     * Send a signal to the thread function that it should exit
-     */
-    virtual void stop(void) { mGuest->interruptEvent(); }
-};
-
 class VBoxGuestSeamless
 {
@@ -75,6 +29,4 @@
     VBoxGuestSeamlessHost mHost;
     VBoxGuestSeamlessX11 mGuest;
-    VBoxGuestSeamlessGuestThread mGuestFunction;
-    VBoxGuestThread mGuestThread;
 
     bool isInitialised;
@@ -92,5 +44,5 @@
         if (RT_SUCCESS(rc))
         {
-            rc = mHost.init(&mGuestThread);
+            rc = mHost.init(&mGuest);
         }
         if (RT_SUCCESS(rc))
@@ -120,5 +72,4 @@
         {
             mHost.stop(cMillies);
-            mGuestThread.stop(cMillies, 0);
             mGuest.uninit();
             isInitialised = false;
@@ -127,10 +78,5 @@
     }
 
-    VBoxGuestSeamless() : mGuestFunction(&mGuest),
-                          mGuestThread(&mGuestFunction, 0, RTTHREADTYPE_MSG_PUMP,
-                                       RTTHREADFLAGS_WAITABLE, "Guest events")
-    {
-        isInitialised = false;
-    }
+    VBoxGuestSeamless() { isInitialised = false; }
     ~VBoxGuestSeamless() { uninit(); }
 };
Index: unk/src/VBox/Additions/x11/VBoxClient/thread.cpp
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/thread.cpp	(revision 50335)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/** @file
- *
- * VirtualBox additions client application: thread class.
- */
-
-/*
- * Copyright (C) 2006-2011 Oracle Corporation
- *
- * 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.
- */
-
-#include <VBox/log.h>
-
-#include "thread.h"
-
-/** Stop the thread using its stop method and get the exit value. */
-int VBoxGuestThread::stop(RTMSINTERVAL cMillies, int *prc)
-{
-    int rc = VINF_SUCCESS;
-
-    LogRelFlowFunc(("\n"));
-    if (NIL_RTTHREAD == mSelf)  /* Assertion */
-    {
-        LogRelThisFunc(("Attempted to stop thread %s which is not running!\n", mName));
-        return VERR_INTERNAL_ERROR;
-    }
-    mExit = true;
-    mFunction->stop();
-    if (0 != (mFlags & RTTHREADFLAGS_WAITABLE))
-    {
-        rc = RTThreadWait(mSelf, cMillies, prc);
-        if (RT_SUCCESS(rc))
-        {
-            mSelf = NIL_RTTHREAD;
-        }
-        else
-        {
-            LogRelThisFunc(("Failed to stop thread %s!\n", mName));
-        }
-    }
-    LogRelFlowFunc(("returning %Rrc\n", rc));
-    return rc;
-}
-
-/** Destroy the class, stopping the thread if necessary. */
-VBoxGuestThread::~VBoxGuestThread(void)
-{
-    LogRelFlowFunc(("\n"));
-    if (NIL_RTTHREAD != mSelf)
-    {
-        LogRelThisFunc(("Warning!  Stopping thread %s, as it is still running!\n", mName));
-        stop(2000, 0);
-    }
-    LogRelFlowFunc(("returning\n"));
-}
-
-/** Start the thread. */
-int VBoxGuestThread::start(void)
-{
-    int rc = VINF_SUCCESS;
-
-    LogRelFlowFunc(("returning\n"));
-    if (NIL_RTTHREAD != mSelf)  /* Assertion */
-    {
-        LogRelThisFunc(("Attempted to start thread %s twice!\n", mName));
-        return VERR_INTERNAL_ERROR;
-    }
-    mExit = false;
-    rc = RTThreadCreate(&mSelf, threadFunction, reinterpret_cast<void *>(this),
-                          mStack, mType, mFlags, mName);
-    LogRelFlowFunc(("returning %Rrc\n", rc));
-    return rc;
-}
-
-/** Yield the CPU */
-bool VBoxGuestThread::yield(void)
-{
-    return RTThreadYield();
-}
-
-/** The "real" thread function for the VBox runtime. */
-int VBoxGuestThread::threadFunction(RTTHREAD self, void *pvUser)
-{
-    int rc = VINF_SUCCESS;
-
-    LogRelFlowFunc(("\n"));
-    PSELF pSelf = reinterpret_cast<PSELF>(pvUser);
-    pSelf->mRunning = true;
-    rc = pSelf->mFunction->threadFunction(pSelf);
-    pSelf->mRunning = false;
-    LogRelFlowFunc(("returning %Rrc\n", rc));
-    return rc;
-}
Index: unk/src/VBox/Additions/x11/VBoxClient/thread.h
===================================================================
--- /trunk/src/VBox/Additions/x11/VBoxClient/thread.h	(revision 50335)
+++ 	(revision )
@@ -1,131 +1,0 @@
-/** @file
- *
- * VirtualBox additions client application: thread class.
- */
-
-/*
- * Copyright (C) 2006-2010 Oracle Corporation
- *
- * 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.
- */
-
-#ifndef __Additions_client_thread_h
-# define __Additions_client_thread_h
-
-#include <iprt/thread.h>
-#include <iprt/err.h>
-
-#include <VBox/log.h>
-
-class VBoxGuestThread;
-
-/** Virtual parent class for thread functions for the VBoxGuestThread class. */
-class VBoxGuestThreadFunction
-{
-public:
-    // VBoxGuestThreadFunction(void);
-    virtual ~VBoxGuestThreadFunction(void) {}
-    /**
-      * The actual thread function.
-      *
-      * @returns iprt status code as thread return value
-      * @param pParent the VBoxGuestThread running this thread function
-      */
-    virtual int threadFunction(VBoxGuestThread *pPThread) = 0;
-    /**
-     * Send a signal to the thread function that it should exit.  This should not block.
-     */
-    virtual void stop(void) = 0;
-};
-
-/** C++ wrapper for VBox runtime threads. */
-class VBoxGuestThread
-{
-private:
-    // Private member variables
-    /** The thread function for this thread */
-    VBoxGuestThreadFunction *mFunction;
-    /** The size of the stack for the new thread.  Use 0 for the default stack size. */
-    size_t mStack;
-    /** The thread type. Used for deciding scheduling attributes of the thread. */
-    RTTHREADTYPE mType;
-    /** Flags of the RTTHREADFLAGS type (ORed together). */
-    unsigned mFlags;
-    /** Thread name */
-    const char *mName;
-    /** The VBox runtime thread handle. */
-    RTTHREAD mSelf;
-    /** Is the thread currently running? */
-    volatile bool mRunning;
-    /** Should the thread be stopped? */
-    volatile bool mExit;
-
-    // Typedefs
-    /** Ourselves, for use in the thread function. */
-    typedef VBoxGuestThread *PSELF;
-public:
-    /**
-     * Initialise the class.
-     * @param   pFunction   the thread function for this thread
-     * @param   cbStack     The size of the stack for the new thread.
-     *                      Use 0 for the default stack size.
-     * @param   enmType     The thread type. Used for deciding scheduling attributes
-     *                      of the thread.
-     * @param   fFlags      Flags of the RTTHREADFLAGS type (ORed together).
-     * @param   pszName     Thread name.
-     */
-    VBoxGuestThread(VBoxGuestThreadFunction *pFunction, size_t cbStack, RTTHREADTYPE enmType,
-                    unsigned fFlags, const char *pszName)
-    {
-        mFunction = pFunction;
-        mStack = cbStack;
-        mType = enmType;
-        mFlags = fFlags;
-        mName = pszName;
-        mSelf = NIL_RTTHREAD;
-        mRunning = false;
-        mExit = false;
-    }
-    /** Stop the thread using its stop method and get the exit value.
-     * @returns iprt status code
-     * @param   cMillies        The number of milliseconds to wait. Use RT_INDEFINITE_WAIT for
-     *                              an indefinite wait.  Only relevant if the thread is
-     *                              waitable.
-     * @param   prc             Where to store the return code of the thread. Optional.
-     */
-    int stop(RTMSINTERVAL cMillies, int *prc);
-
-    /** Destroy the class, stopping the thread if necessary. */
-    ~VBoxGuestThread(void);
-
-    /** Return the VBox runtime thread handle. */
-    RTTHREAD getSelf(void) { return mSelf; }
-
-    /** Start the thread. */
-    int start(void);
-
-    /** Yield the CPU */
-    bool yield(void);
-
-    /** Is the thread running? */
-    bool isRunning(void) { return mRunning; }
-
-    /** Should the thread function exit? */
-    bool isStopping(void) { return mExit; }
-private:
-    // Copying or assigning a thread object is not sensible
-    VBoxGuestThread(const VBoxGuestThread&);
-    VBoxGuestThread& operator=(const VBoxGuestThread&);
-
-    // Member functions
-    /** The "real" thread function for the VBox runtime. */
-    static DECLCALLBACK(int) threadFunction(RTTHREAD self, void *pvUser);
-};
-
-#endif /* __Additions_client_thread_h not defined */
