blob: 3bb8d64b7dc8c8761f2e0383b44c30f61b61e8f5 [file] [log] [blame]
Carl van Schaik5ddd8142018-05-28 14:32:27 +10001/*
2 * Copyright (c) 2012-2018 General Dynamics
3 * Copyright (c) 2014 Open Kernel Labs, Inc
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef _MICROVISOR_H_
19#define _MICROVISOR_H_
20
21/**
22 * @defgroup lib_microvisor The Microvisor Library
23 *
24 * @{
25 *
26 * The Microvisor Library is the primary low-level API between the OKL4
27 * Microvisor and a Cell application or guest-OS. It also provides certain
28 * common data types such as structure definitions used in these interactions.
29 *
30 */
31
32/**
33 * Temporarily define _Bool to allow C++ compilation of
34 * OKL code that makes use of it.
35 */
36#if defined(__cplusplus) && !defined(_Bool)
37#define _OKL4_CPP_BOOL
38#define _Bool bool
39#endif
40
41#define OKL4_INLINE static inline
42
43#if defined(_lint) || defined(_splint)
44#define OKL4_FORCE_INLINE static
45#else
46#define OKL4_FORCE_INLINE static inline __attribute__((always_inline))
47#endif
48
49#include <microvisor/kernel/types.h>
50#include <microvisor/kernel/microvisor.h>
51#include <microvisor/kernel/syscalls.h>
52#include <microvisor/kernel/offsets.h>
53
54/** @} */
55
56/**
57 * Remove temporary definition of _Bool if it was defined
58 */
59#if defined(_OKL4_CPP_BOOL)
60#undef _Bool
61#undef _OKL4_CPP_BOOL
62#endif
63
64#endif /* _MICROVISOR_H_ */