1 | /* $Id: initterm-gc.cpp 4071 2007-08-07 17:07:59Z 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 |
|
---|
18 |
|
---|
19 |
|
---|
20 | /*******************************************************************************
|
---|
21 | * Header Files *
|
---|
22 | *******************************************************************************/
|
---|
23 | #define LOG_GROUP RTLOGGROUP_DEFAULT
|
---|
24 |
|
---|
25 | #include <iprt/initterm.h>
|
---|
26 | #include <iprt/time.h>
|
---|
27 | #include <iprt/log.h>
|
---|
28 | #include <iprt/err.h>
|
---|
29 | #include <iprt/string.h>
|
---|
30 | #include "internal/time.h"
|
---|
31 |
|
---|
32 |
|
---|
33 | /*******************************************************************************
|
---|
34 | * Global Variables *
|
---|
35 | *******************************************************************************/
|
---|
36 | /**
|
---|
37 | * Program start nanosecond TS.
|
---|
38 | */
|
---|
39 | uint64_t g_u64ProgramStartNanoTS;
|
---|
40 |
|
---|
41 | /**
|
---|
42 | * Program start microsecond TS.
|
---|
43 | */
|
---|
44 | uint64_t g_u64ProgramStartMicroTS;
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Program start millisecond TS.
|
---|
48 | */
|
---|
49 | uint64_t g_u64ProgramStartMilliTS;
|
---|
50 |
|
---|
51 |
|
---|
52 | /**
|
---|
53 | * Initalizes the guest context runtime library.
|
---|
54 | *
|
---|
55 | * @returns iprt status code.
|
---|
56 | *
|
---|
57 | * @param u64ProgramStartNanoTS The startup timestamp.
|
---|
58 | */
|
---|
59 | RTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS)
|
---|
60 | {
|
---|
61 | /*
|
---|
62 | * Init the program start TSes.
|
---|
63 | */
|
---|
64 | g_u64ProgramStartNanoTS = u64ProgramStartNanoTS;
|
---|
65 | g_u64ProgramStartMicroTS = u64ProgramStartNanoTS / 1000;
|
---|
66 | g_u64ProgramStartMilliTS = u64ProgramStartNanoTS / 1000000;
|
---|
67 |
|
---|
68 | LogFlow(("RTGCInit: returns VINF_SUCCESS\n"));
|
---|
69 | return VINF_SUCCESS;
|
---|
70 | }
|
---|
71 |
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * Terminates the guest context runtime library.
|
---|
75 | */
|
---|
76 | RTGCDECL(void) RTGCTerm(void)
|
---|
77 | {
|
---|
78 | /* do nothing */
|
---|
79 | }
|
---|