FreeNOS
ProcessCtl.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_PROCESSCTL_H
19#define __KERNEL_API_PROCESSCTL_H
20
21#include <FreeNOS/Process.h>
22#include <Types.h>
23
59
75
78
94 const ProcessOperation op,
95 const Address addr = 0,
96 const Address output = 0)
97{
98 return (API::Result) trapKernel4(API::ProcessCtlNumber, proc, op, addr, output);
99}
100
105#ifdef __KERNEL__
106
126extern API::Result ProcessCtlHandler(const ProcessID proc,
127 const ProcessOperation op,
128 const Address addr,
129 const Address output);
130
135#endif /* __KERNEL__ */
136
141#endif /* __KERNEL_API_PROCESSCTL_H */
Result
Enumeration of generic kernel API result codes.
Definition API.h:69
@ ProcessCtlNumber
Definition API.h:52
Logging class.
Definition Log.h:97
State
Represents the execution state of the Process.
Definition Process.h:67
API::Result ProcessCtlHandler(const ProcessID proc, const ProcessOperation op, const Address addr, const Address output)
Kernel handler prototype.
API::Result ProcessCtl(const ProcessID proc, const ProcessOperation op, const Address addr=0, const Address output=0)
Prototype for user applications.
Definition ProcessCtl.h:93
ProcessOperation
Available operation to perform using ProcessCtl.
Definition ProcessCtl.h:38
Log & operator<<(Log &log, ProcessOperation op)
Operator to print a ProcessOperation to a Log.
@ Resume
Definition ProcessCtl.h:55
@ WatchIRQ
Definition ProcessCtl.h:43
@ GetParent
Definition ProcessCtl.h:42
@ EnterSleep
Definition ProcessCtl.h:51
@ WaitTimer
Definition ProcessCtl.h:50
@ WaitPID
Definition ProcessCtl.h:48
@ SendIRQ
Definition ProcessCtl.h:46
@ InfoPID
Definition ProcessCtl.h:47
@ Reset
Definition ProcessCtl.h:56
@ Spawn
Definition ProcessCtl.h:39
@ KillPID
Definition ProcessCtl.h:40
@ InfoTimer
Definition ProcessCtl.h:49
@ DisableIRQ
Definition ProcessCtl.h:45
@ GetPID
Definition ProcessCtl.h:41
@ Schedule
Definition ProcessCtl.h:52
@ EnableIRQ
Definition ProcessCtl.h:44
@ Stop
Definition ProcessCtl.h:54
@ Wakeup
Definition ProcessCtl.h:53
ulong trapKernel4(ulong api, ulong arg1, ulong arg2, ulong arg3, ulong arg4)
Perform a kernel trap with 4 arguments.
Definition ARMTraps.h:128
u32 ProcessID
Process Identification Number.
Definition Types.h:140
unsigned long Address
A memory address.
Definition Types.h:131
Process information structure, used for Info.
Definition ProcessCtl.h:64
Process::State state
Defines the current state of the Process.
Definition ProcessCtl.h:72
ProcessID id
Process Identity number.
Definition ProcessCtl.h:66
ProcessID parent
Parent process id.
Definition ProcessCtl.h:69