VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/time/timesupA.asm@ 49456

Last change on this file since 49456 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1; $Id: timesupA.asm 44528 2013-02-04 14:27:54Z vboxsync $
2;; @file
3; IPRT - Time using SUPLib, the Assembly Implementation.
4;
5
6;
7; Copyright (C) 2006-2010 Oracle Corporation
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
27%ifndef IN_GUEST
28
29%include "iprt/asmdefs.mac"
30%include "VBox/sup.mac"
31
32
33;; Keep this in sync with iprt/time.h.
34struc RTTIMENANOTSDATA
35 .pu64Prev RTCCPTR_RES 1
36 .pfnBad RTCCPTR_RES 1
37 .pfnRediscover RTCCPTR_RES 1
38 .pvDummy RTCCPTR_RES 1
39 .c1nsSteps resd 1
40 .cExpired resd 1
41 .cBadPrev resd 1
42 .cUpdateRaces resd 1
43endstruc
44
45
46BEGINDATA
47%undef IN_SUPLIB
48%undef IMPORTED_SUPLIB
49%ifdef IN_SUP_R0
50 %define IN_SUPLIB
51%endif
52%ifdef IN_SUP_R3
53 %define IN_SUPLIB
54%endif
55%ifdef IN_SUP_RC
56 %define IN_SUPLIB
57%endif
58%ifdef IN_SUPLIB
59 extern NAME(g_pSUPGlobalInfoPage)
60%elifdef IN_RING0
61 %ifdef RT_OS_WINDOWS
62 %define IMPORTED_SUPLIB
63 extern IMPNAME(g_SUPGlobalInfoPage)
64 %else
65 extern NAME(g_SUPGlobalInfoPage)
66 %endif
67%else
68 %ifdef RT_OS_WINDOWS
69 %define IMPORTED_SUPLIB
70 extern IMPNAME(g_pSUPGlobalInfoPage)
71 %else
72 extern NAME(g_pSUPGlobalInfoPage)
73 %endif
74%endif
75
76
77BEGINCODE
78
79;
80; The default stuff that works everywhere.
81; Uses cpuid for serializing.
82;
83%undef ASYNC_GIP
84%undef USE_LFENCE
85%define NEED_TRANSACTION_ID
86%define NEED_TO_SAVE_REGS
87%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacySync
88%include "timesupA.mac"
89
90%define ASYNC_GIP
91%ifdef IN_RC
92 %undef NEED_TRANSACTION_ID
93%endif
94%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacyAsync
95%include "timesupA.mac"
96
97;
98; Alternative implementation that employs lfence instead of cpuid.
99;
100%undef ASYNC_GIP
101%define USE_LFENCE
102%define NEED_TRANSACTION_ID
103%undef NEED_TO_SAVE_REGS
104%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceSync
105%include "timesupA.mac"
106
107%define ASYNC_GIP
108%ifdef IN_RC
109 %undef NEED_TRANSACTION_ID
110%endif
111%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceAsync
112%include "timesupA.mac"
113
114
115%endif ; !IN_GUEST
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