1 | /* $Id: initterm-gc.cpp 3124 2007-06-15 14:46:55Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * innotek Portable Runtime - Init Guest Context.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 innotek 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 | * If you received this file as part of a commercial VirtualBox
|
---|
18 | * distribution, then only the terms of your commercial VirtualBox
|
---|
19 | * license agreement apply instead of the previous paragraph.
|
---|
20 | */
|
---|
21 |
|
---|
22 |
|
---|
23 |
|
---|
24 | /*******************************************************************************
|
---|
25 | * Header Files *
|
---|
26 | *******************************************************************************/
|
---|
27 | #define LOG_GROUP RTLOGGROUP_DEFAULT
|
---|
28 |
|
---|
29 | #include <iprt/initterm.h>
|
---|
30 | #include <iprt/time.h>
|
---|
31 | #include <iprt/log.h>
|
---|
32 | #include <iprt/err.h>
|
---|
33 | #include <iprt/string.h>
|
---|
34 | #include "internal/time.h"
|
---|
35 |
|
---|
36 |
|
---|
37 | /*******************************************************************************
|
---|
38 | * Global Variables *
|
---|
39 | *******************************************************************************/
|
---|
40 | /**
|
---|
41 | * Program start nanosecond TS.
|
---|
42 | */
|
---|
43 | uint64_t g_u64ProgramStartNanoTS;
|
---|
44 |
|
---|
45 | /**
|
---|
46 | * Program start microsecond TS.
|
---|
47 | */
|
---|
48 | uint64_t g_u64ProgramStartMicroTS;
|
---|
49 |
|
---|
50 | /**
|
---|
51 | * Program start millisecond TS.
|
---|
52 | */
|
---|
53 | uint64_t g_u64ProgramStartMilliTS;
|
---|
54 |
|
---|
55 |
|
---|
56 | /**
|
---|
57 | * Initalizes the guest context runtime library.
|
---|
58 | *
|
---|
59 | * @returns iprt status code.
|
---|
60 | *
|
---|
61 | * @param u64ProgramStartNanoTS The startup timestamp.
|
---|
62 | */
|
---|
63 | RTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS)
|
---|
64 | {
|
---|
65 | /*
|
---|
66 | * Init the program start TSes.
|
---|
67 | */
|
---|
68 | g_u64ProgramStartNanoTS = u64ProgramStartNanoTS;
|
---|
69 | g_u64ProgramStartMicroTS = u64ProgramStartNanoTS / 1000;
|
---|
70 | g_u64ProgramStartMilliTS = u64ProgramStartNanoTS / 1000000;
|
---|
71 |
|
---|
72 | LogFlow(("RTGCInit: returns VINF_SUCCESS\n"));
|
---|
73 | return VINF_SUCCESS;
|
---|
74 | }
|
---|
75 |
|
---|
76 |
|
---|
77 | /**
|
---|
78 | * Terminates the guest context runtime library.
|
---|
79 | */
|
---|
80 | RTGCDECL(void) RTGCTerm(void)
|
---|
81 | {
|
---|
82 | /* do nothing */
|
---|
83 | }
|
---|