FreeNOS
kernel
API
PrivExec.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2009 Niek Linnenbank
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef __KERNEL_API_PRIVEXEC_H
19
#define __KERNEL_API_PRIVEXEC_H
20
34
typedef
enum
PrivOperation
35
{
36
Idle
= 0,
37
RebootSystem
= 1,
38
ShutdownSystem
= 2,
39
WriteConsole
= 3,
40
Panic
= 4
41
}
42
PrivOperation
;
43
52
inline
API::Result
PrivExec
(
const
PrivOperation
op,
53
const
Address
param
= 0)
54
{
55
return
(
API::Result
)
trapKernel2
(
API::PrivExecNumber
, op,
param
);
56
}
57
62
#ifdef __KERNEL__
63
77
extern
API::Result
PrivExecHandler
(
const
PrivOperation
op,
78
const
Address
param
);
79
84
#endif
/* __KERNEL__ */
85
90
#endif
/* __KERNEL_API_PRIVEXEC_H */
API::Result
Result
Enumeration of generic kernel API result codes.
Definition:
API.h:68
Panic
@ Panic
Definition:
PrivExec.h:40
PrivExec
API::Result PrivExec(const PrivOperation op, const Address param=0)
Prototype for user applications.
Definition:
PrivExec.h:52
Address
unsigned long Address
A memory address.
Definition:
Types.h:131
param
void param(Terminal *term, int key, int value)
Set terminal parameters.
Definition:
Terminal.cpp:305
trapKernel2
ulong trapKernel2(ulong api, ulong arg1, ulong arg2)
Perform a kernel trap with 2 arguments.
Definition:
ARMTraps.h:80
Idle
@ Idle
Definition:
PrivExec.h:36
API::PrivExecNumber
@ PrivExecNumber
Definition:
API.h:51
RebootSystem
@ RebootSystem
Definition:
PrivExec.h:37
PrivExecHandler
API::Result PrivExecHandler(const PrivOperation op, const Address param)
Prototype for kernel handler.
Definition:
PrivExec.cpp:23
PrivOperation
PrivOperation
Available operations to perform using PrivExec().
Definition:
PrivExec.h:34
WriteConsole
@ WriteConsole
Definition:
PrivExec.h:39
ShutdownSystem
@ ShutdownSystem
Definition:
PrivExec.h:38
Generated by
1.8.17