initterm.h revision a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fc
392N/A/** @file
392N/A * innotek Portable Runtime - Runtime Init/Term.
392N/A */
392N/A
392N/A/*
392N/A * Copyright (C) 2006-2007 innotek GmbH
392N/A *
392N/A * This file is part of VirtualBox Open Source Edition (OSE), as
392N/A * available from http://www.virtualbox.org. This file is free software;
392N/A * you can redistribute it and/or modify it under the terms of the GNU
392N/A * General Public License (GPL) as published by the Free Software
392N/A * Foundation, in version 2 as it comes in the "COPYING" file of the
392N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
392N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
392N/A *
392N/A * The contents of this file may alternatively be used under the terms
392N/A * of the Common Development and Distribution License Version 1.0
392N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
392N/A * VirtualBox OSE distribution, in which case the provisions of the
392N/A * CDDL are applicable instead of those of the GPL.
392N/A *
392N/A * You may elect to license modified versions of this file under the
392N/A * terms and conditions of either the GPL or the CDDL or both.
392N/A */
392N/A
392N/A#ifndef ___iprt_initterm_h
392N/A#define ___iprt_initterm_h
392N/A
392N/A#include <iprt/cdefs.h>
392N/A#include <iprt/types.h>
392N/A
392N/A__BEGIN_DECLS
392N/A
392N/A/** @defgroup grp_rt innotek Portable Runtime APIs
392N/A * @{
392N/A */
392N/A
392N/A/** @defgroup grp_rt_initterm Init / Term
392N/A * @{
392N/A */
392N/A
392N/A#ifdef IN_RING3
392N/A/**
392N/A * Initalizes the runtime library.
392N/A *
392N/A * @returns iprt status code.
392N/A *
392N/A * @param fInitSUPLib Set if SUPInit() shall be called during init (default).
392N/A * Clear if not to call it.
392N/A * @param cbReserve The number of bytes of contiguous memory that should be reserved by
392N/A * the runtime / support library.
392N/A * Set this to 0 if no reservation is required. (default)
392N/A * Set this to ~(size_t)0 if the maximum amount supported by the VM is to be
392N/A * attempted reserved, or the maximum available.
392N/A * This argument only applies if fInitSUPLib is true and we're in ring-3 HC.
392N/A */
392N/ARTR3DECL(int) RTR3Init(
392N/A#ifdef __cplusplus
392N/A bool fInitSUPLib = true,
392N/A size_t cbReserve = 0
392N/A#else
392N/A bool fInitSUPLib,
392N/A size_t cbReserve
392N/A#endif
392N/A );
392N/A
392N/A/**
392N/A * Terminates the runtime library.
392N/A */
392N/ARTR3DECL(void) RTR3Term(void);
392N/A#endif
392N/A
392N/A
392N/A#ifdef IN_RING0
392N/A/**
392N/A * Initalizes the ring-0 driver runtime library.
392N/A *
392N/A * @returns iprt status code.
392N/A * @param fReserved Flags reserved for the future.
392N/A */
392N/ARTR0DECL(int) RTR0Init(unsigned fReserved);
392N/A
392N/A/**
392N/A * Terminates the ring-0 driver runtime library.
392N/A */
392N/ARTR0DECL(void) RTR0Term(void);
392N/A#endif
392N/A
392N/A#ifdef IN_GC
392N/A/**
392N/A * Initalizes the guest context runtime library.
392N/A *
392N/A * @returns iprt status code.
392N/A *
392N/A * @param u64ProgramStartNanoTS The startup timestamp.
392N/A */
392N/ARTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS);
392N/A
392N/A/**
392N/A * Terminates the guest context runtime library.
392N/A */
392N/ARTGCDECL(void) RTGCTerm(void);
392N/A#endif
392N/A
392N/A
392N/A/** @} */
392N/A
392N/A/** @} */
392N/A
392N/A__END_DECLS
392N/A
392N/A
392N/A#endif
392N/A
392N/A