1 | /* $Id: timesupref.cpp 5456 2007-10-24 01:04:51Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * innotek Portable Runtime - Time using SUPLib, the C Implementation.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 InnoTek Systemberatung GmbH
|
---|
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 as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef IN_GUEST
|
---|
20 |
|
---|
21 | /*******************************************************************************
|
---|
22 | * Header Files *
|
---|
23 | *******************************************************************************/
|
---|
24 | #include <iprt/time.h>
|
---|
25 | #include <iprt/asm.h>
|
---|
26 | #include <VBox/sup.h>
|
---|
27 | #include "internal/time.h"
|
---|
28 |
|
---|
29 |
|
---|
30 | /*
|
---|
31 | * Use the CPUID instruction for some kind of serialization.
|
---|
32 | */
|
---|
33 | #undef ASYNC_GIP
|
---|
34 | #undef USE_LFENCE
|
---|
35 | #define NEED_TRANSACTION_ID
|
---|
36 | #define rtTimeNanoTSInternalRef RTTimeNanoTSLegacySync
|
---|
37 | #include "timesupref.h"
|
---|
38 |
|
---|
39 | #define ASYNC_GIP
|
---|
40 | #ifdef IN_GC
|
---|
41 | # undef NEED_TRANSACTION_ID
|
---|
42 | #endif
|
---|
43 | #undef rtTimeNanoTSInternalRef
|
---|
44 | #define rtTimeNanoTSInternalRef RTTimeNanoTSLegacyAsync
|
---|
45 | #include "timesupref.h"
|
---|
46 |
|
---|
47 |
|
---|
48 | /*
|
---|
49 | * Use LFENCE for load serialization.
|
---|
50 | */
|
---|
51 | #undef ASYNC_GIP
|
---|
52 | #define USE_LFENCE
|
---|
53 | #undef NEED_TRANSACTION_ID
|
---|
54 | #define NEED_TRANSACTION_ID
|
---|
55 | #undef rtTimeNanoTSInternalRef
|
---|
56 | #define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceSync
|
---|
57 | #include "timesupref.h"
|
---|
58 |
|
---|
59 | #define ASYNC_GIP
|
---|
60 | #ifdef IN_GC
|
---|
61 | # undef NEED_TRANSACTION_ID
|
---|
62 | #endif
|
---|
63 | #undef rtTimeNanoTSInternalRef
|
---|
64 | #define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceAsync
|
---|
65 | #include "timesupref.h"
|
---|
66 |
|
---|
67 |
|
---|
68 | #endif /* !IN_GUEST */
|
---|