VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/time/timesupref.cpp@ 25721

Last change on this file since 25721 was 21337, checked in by vboxsync, 16 years ago

IPRT,HostDrv,AddDrv: Export public IPRT symbols for the linux kernel (pain).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1/* $Id: timesupref.cpp 21337 2009-07-07 14:58:27Z vboxsync $ */
2/** @file
3 * IPRT - Time using SUPLib, the C Implementation.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 *
26 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27 * Clara, CA 95054 USA or visit http://www.sun.com if you need
28 * additional information or have any questions.
29 */
30
31#ifndef IN_GUEST
32
33/*******************************************************************************
34* Header Files *
35*******************************************************************************/
36#include <iprt/time.h>
37#include "internal/iprt.h"
38
39#include <iprt/asm.h>
40#include <VBox/sup.h>
41#include "internal/time.h"
42
43
44/*
45 * Use the CPUID instruction for some kind of serialization.
46 */
47#undef ASYNC_GIP
48#undef USE_LFENCE
49#define NEED_TRANSACTION_ID
50#define rtTimeNanoTSInternalRef RTTimeNanoTSLegacySync
51#include "timesupref.h"
52RT_EXPORT_SYMBOL(RTTimeNanoTSLegacySync);
53
54#define ASYNC_GIP
55#ifdef IN_RC
56# undef NEED_TRANSACTION_ID
57#endif
58#undef rtTimeNanoTSInternalRef
59#define rtTimeNanoTSInternalRef RTTimeNanoTSLegacyAsync
60#include "timesupref.h"
61RT_EXPORT_SYMBOL(RTTimeNanoTSLegacyAsync);
62
63
64/*
65 * Use LFENCE for load serialization.
66 */
67#undef ASYNC_GIP
68#define USE_LFENCE
69#undef NEED_TRANSACTION_ID
70#define NEED_TRANSACTION_ID
71#undef rtTimeNanoTSInternalRef
72#define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceSync
73#include "timesupref.h"
74RT_EXPORT_SYMBOL(RTTimeNanoTSLFenceSync);
75
76#define ASYNC_GIP
77#ifdef IN_RC
78# undef NEED_TRANSACTION_ID
79#endif
80#undef rtTimeNanoTSInternalRef
81#define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceAsync
82#include "timesupref.h"
83RT_EXPORT_SYMBOL(RTTimeNanoTSLFenceAsync);
84
85
86#endif /* !IN_GUEST */
87
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette