IntrOS
Toggle main menu visibility
Loading...
Searching...
No Matches
ossys.h
1
/******************************************************************************
2
3
@file IntrOS: ossys.h
4
@author Rajmund Szymanski
5
@date 27.05.2021
6
@brief This file contains definitions for IntrOS.
7
8
******************************************************************************
9
10
Copyright (c) 2018-2022 Rajmund Szymanski. All rights reserved.
11
12
Permission is hereby granted, free of charge, to any person obtaining a copy
13
of this software and associated documentation files (the "Software"), to
14
deal in the Software without restriction, including without limitation the
15
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16
sell copies of the Software, and to permit persons to whom the Software is
17
furnished to do so, subject to the following conditions:
18
19
The above copyright notice and this permission notice shall be included
20
in all copies or substantial portions of the Software.
21
22
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28
IN THE SOFTWARE.
29
30
******************************************************************************/
31
32
#ifndef __INTROS_SYS_H
33
#define __INTROS_SYS_H
34
35
#include "oskernel.h"
36
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
53
54
#ifdef __CONSTRUCTOR
55
__CONSTRUCTOR
56
#endif
57
void
sys_init
(
void
);
58
62
63
void
sys_suspend
(
void
);
64
68
69
void
sys_resume
(
void
);
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
/* -------------------------------------------------------------------------- */
76
77
#ifdef __cplusplus
78
namespace
intros {
79
80
static
inline
void
suspend() {
sys_suspend
(); }
81
static
inline
void
resume() {
sys_resume
(); }
82
83
}
// namespace
84
#endif
//__cplusplus
85
86
/* -------------------------------------------------------------------------- */
87
89
90
#endif
//__INTROS_SYS_H
sys_suspend
void sys_suspend(void)
enter to system suspend mode (executes only current task)
sys_resume
void sys_resume(void)
exit from system suspend mode
sys_init
void sys_init(void)
initialize system timer and enable services
kernel
ossys.h
Generated by
1.18.0