timesupref.cpp revision 1e40f57c72c881067b0314f898e1004211bb7650
1e40f57c72c881067b0314f898e1004211bb7650vboxsync/* $Id$ */
1e40f57c72c881067b0314f898e1004211bb7650vboxsync/** @file
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * innotek Portable Runtime - Time using SUPLib, the C Implementation.
1e40f57c72c881067b0314f898e1004211bb7650vboxsync */
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync/*
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * Copyright (C) 2006-2007 InnoTek Systemberatung GmbH
1e40f57c72c881067b0314f898e1004211bb7650vboxsync *
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * available from http://www.virtualbox.org. This file is free software;
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * you can redistribute it and/or modify it under the terms of the GNU
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * General Public License as published by the Free Software Foundation,
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * distribution. VirtualBox OSE is distributed in the hope that it will
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * be useful, but WITHOUT ANY WARRANTY of any kind.
1e40f57c72c881067b0314f898e1004211bb7650vboxsync *
1e40f57c72c881067b0314f898e1004211bb7650vboxsync */
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#ifndef IN_GUEST
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync/*******************************************************************************
1e40f57c72c881067b0314f898e1004211bb7650vboxsync* Header Files *
1e40f57c72c881067b0314f898e1004211bb7650vboxsync*******************************************************************************/
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include <iprt/time.h>
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include <iprt/asm.h>
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include <VBox/sup.h>
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include "internal/time.h"
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync/*
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * Use the CPUID instruction for some kind of serialization.
1e40f57c72c881067b0314f898e1004211bb7650vboxsync */
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef ASYNC_GIP
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef USE_LFENCE
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define NEED_TRANSACTION_ID
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define rtTimeNanoTSInternalRef RTTimeNanoTSLegacySync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include "timesupref.h"
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define ASYNC_GIP
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#ifdef IN_GC
1e40f57c72c881067b0314f898e1004211bb7650vboxsync# undef NEED_TRANSACTION_ID
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#endif
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef rtTimeNanoTSInternalRef
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define rtTimeNanoTSInternalRef RTTimeNanoTSLegacyAsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include "timesupref.h"
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync/*
1e40f57c72c881067b0314f898e1004211bb7650vboxsync * Use LFENCE for load serialization.
1e40f57c72c881067b0314f898e1004211bb7650vboxsync */
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef ASYNC_GIP
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define USE_LFENCE
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef NEED_TRANSACTION_ID
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define NEED_TRANSACTION_ID
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef rtTimeNanoTSInternalRef
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceSync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include "timesupref.h"
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define ASYNC_GIP
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#ifdef IN_GC
1e40f57c72c881067b0314f898e1004211bb7650vboxsync# undef NEED_TRANSACTION_ID
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#endif
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#undef rtTimeNanoTSInternalRef
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceAsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#include "timesupref.h"
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync
1e40f57c72c881067b0314f898e1004211bb7650vboxsync#endif /* !IN_GUEST */