[1] | 1 | /** @file
|
---|
[2981] | 2 | * innotek Portable Runtime - Runtime Init/Term.
|
---|
[1] | 3 | */
|
---|
| 4 |
|
---|
| 5 | /*
|
---|
[8155] | 6 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
[1] | 7 | *
|
---|
| 8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
| 10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
[5999] | 11 | * General Public License (GPL) as published by the Free Software
|
---|
| 12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
| 15 | *
|
---|
| 16 | * The contents of this file may alternatively be used under the terms
|
---|
| 17 | * of the Common Development and Distribution License Version 1.0
|
---|
| 18 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
| 19 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
| 20 | * CDDL are applicable instead of those of the GPL.
|
---|
| 21 | *
|
---|
| 22 | * You may elect to license modified versions of this file under the
|
---|
| 23 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
[8155] | 24 | *
|
---|
| 25 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
| 26 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
| 27 | * additional information or have any questions.
|
---|
[1] | 28 | */
|
---|
| 29 |
|
---|
[3630] | 30 | #ifndef ___iprt_initterm_h
|
---|
| 31 | #define ___iprt_initterm_h
|
---|
[1] | 32 |
|
---|
| 33 | #include <iprt/cdefs.h>
|
---|
| 34 | #include <iprt/types.h>
|
---|
| 35 |
|
---|
| 36 | __BEGIN_DECLS
|
---|
| 37 |
|
---|
[2981] | 38 | /** @defgroup grp_rt innotek Portable Runtime APIs
|
---|
[1] | 39 | * @{
|
---|
| 40 | */
|
---|
| 41 |
|
---|
| 42 | /** @defgroup grp_rt_initterm Init / Term
|
---|
| 43 | * @{
|
---|
| 44 | */
|
---|
| 45 |
|
---|
| 46 | #ifdef IN_RING3
|
---|
| 47 | /**
|
---|
| 48 | * Initalizes the runtime library.
|
---|
| 49 | *
|
---|
| 50 | * @returns iprt status code.
|
---|
| 51 | *
|
---|
| 52 | * @param fInitSUPLib Set if SUPInit() shall be called during init (default).
|
---|
| 53 | * Clear if not to call it.
|
---|
| 54 | * @param cbReserve The number of bytes of contiguous memory that should be reserved by
|
---|
| 55 | * the runtime / support library.
|
---|
| 56 | * Set this to 0 if no reservation is required. (default)
|
---|
| 57 | * Set this to ~(size_t)0 if the maximum amount supported by the VM is to be
|
---|
| 58 | * attempted reserved, or the maximum available.
|
---|
| 59 | * This argument only applies if fInitSUPLib is true and we're in ring-3 HC.
|
---|
| 60 | */
|
---|
| 61 | RTR3DECL(int) RTR3Init(
|
---|
| 62 | #ifdef __cplusplus
|
---|
| 63 | bool fInitSUPLib = true,
|
---|
| 64 | size_t cbReserve = 0
|
---|
| 65 | #else
|
---|
| 66 | bool fInitSUPLib,
|
---|
| 67 | size_t cbReserve
|
---|
| 68 | #endif
|
---|
| 69 | );
|
---|
| 70 |
|
---|
| 71 | /**
|
---|
| 72 | * Terminates the runtime library.
|
---|
| 73 | */
|
---|
| 74 | RTR3DECL(void) RTR3Term(void);
|
---|
| 75 | #endif
|
---|
| 76 |
|
---|
| 77 |
|
---|
| 78 | #ifdef IN_RING0
|
---|
| 79 | /**
|
---|
| 80 | * Initalizes the ring-0 driver runtime library.
|
---|
| 81 | *
|
---|
| 82 | * @returns iprt status code.
|
---|
| 83 | * @param fReserved Flags reserved for the future.
|
---|
| 84 | */
|
---|
| 85 | RTR0DECL(int) RTR0Init(unsigned fReserved);
|
---|
| 86 |
|
---|
| 87 | /**
|
---|
| 88 | * Terminates the ring-0 driver runtime library.
|
---|
| 89 | */
|
---|
| 90 | RTR0DECL(void) RTR0Term(void);
|
---|
| 91 | #endif
|
---|
| 92 |
|
---|
[3123] | 93 | #ifdef IN_GC
|
---|
| 94 | /**
|
---|
| 95 | * Initalizes the guest context runtime library.
|
---|
| 96 | *
|
---|
| 97 | * @returns iprt status code.
|
---|
| 98 | *
|
---|
| 99 | * @param u64ProgramStartNanoTS The startup timestamp.
|
---|
| 100 | */
|
---|
| 101 | RTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS);
|
---|
| 102 |
|
---|
| 103 | /**
|
---|
| 104 | * Terminates the guest context runtime library.
|
---|
| 105 | */
|
---|
| 106 | RTGCDECL(void) RTGCTerm(void);
|
---|
| 107 | #endif
|
---|
| 108 |
|
---|
| 109 |
|
---|
[1] | 110 | /** @} */
|
---|
| 111 |
|
---|
| 112 | /** @} */
|
---|
| 113 |
|
---|
| 114 | __END_DECLS
|
---|
| 115 |
|
---|
| 116 |
|
---|
| 117 | #endif
|
---|
| 118 |
|
---|