RTThreadPreemptRestore-r0drv-generic.cpp revision f4b715f92688f3c9cadf8fb417f1c87155a95be6
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync/* $Id$ */
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync/** @file
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * IPRT - RTThreadPreemptRestore, Generic ring-0 driver implementation.
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync */
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync/*
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2008 Sun Microsystems, Inc.
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync *
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * available from http://www.virtualbox.org. This file is free software;
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * you can redistribute it and/or modify it under the terms of the GNU
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * General Public License (GPL) as published by the Free Software
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync *
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * The contents of this file may alternatively be used under the terms
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * of the Common Development and Distribution License Version 1.0
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * VirtualBox OSE distribution, in which case the provisions of the
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * CDDL are applicable instead of those of the GPL.
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync *
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * You may elect to license modified versions of this file under the
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * terms and conditions of either the GPL or the CDDL or both.
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync *
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
aa4bcf0a4b2db3ac352b56a291d49cb8d4b66d32vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync * additional information or have any questions.
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync */
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync/*******************************************************************************
aa4bcf0a4b2db3ac352b56a291d49cb8d4b66d32vboxsync* Header Files *
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync*******************************************************************************/
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync#include <iprt/thread.h>
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync#include <iprt/assert.h>
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync
172ae196da38208e5f1e3485715a89f2d53c6880vboxsyncRTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState)
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync{
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync#ifdef RT_OS_WINDOWS
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync /** @todo I disabled this because it did not build on Windows */
72a6fe3989272cb2d409b50caca25e1edbca9398vboxsync AssertReleaseMsgFailed(("This has not yet been implemented on Windows!\n"));
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync#else
7af218a7441de38fc9e814919db04bae3e917664vboxsync AssertPtr(pState);
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync Assert(pState->uchDummy == 42);
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync pState->uchDummy = 0;
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync#endif
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync}
8b4a8db7768e94d025f1216ecfcd50d727fa2b7cvboxsync
172ae196da38208e5f1e3485715a89f2d53c6880vboxsync