FreeNOS
VMCopy.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_VMCOPY_H
19 #define __KERNEL_API_VMCOPY_H
20 
21 #include <Types.h>
22 
42 inline API::Result VMCopy(const ProcessID proc,
43  const API::Operation how,
44  const Address ours,
45  const Address theirs,
46  const Size sz)
47 {
48  return (API::Result) trapKernel5(API::VMCopyNumber, proc, how, ours, theirs, sz);
49 }
50 
55 #ifdef __KERNEL__
56 
76 extern API::Result VMCopyHandler(const ProcessID proc,
77  const API::Operation how,
78  const Address ours,
79  const Address theirs,
80  const Size sz);
81 
86 #endif /* __KERNEL__ */
87 
92 #endif /* __KERNEL_API_VMCOPY_H */
VMCopyHandler
API::Result VMCopyHandler(const ProcessID proc, const API::Operation how, const Address ours, const Address theirs, const Size sz)
Kernel handler prototype.
Definition: VMCopy.cpp:24
API::Result
Result
Enumeration of generic kernel API result codes.
Definition: API.h:68
Types.h
API::Operation
Operation
Various actions which may be performed inside an APIHandler.
Definition: API.h:91
ProcessID
u32 ProcessID
Process Identification Number.
Definition: Types.h:140
Address
unsigned long Address
A memory address.
Definition: Types.h:131
trapKernel5
ulong trapKernel5(ulong api, ulong arg1, ulong arg2, ulong arg3, ulong arg4, ulong arg5)
Perform a kernel trap with 5 arguments.
Definition: ARMTraps.h:156
Size
unsigned int Size
Any sane size indicator cannot go negative.
Definition: Types.h:128
VMCopy
API::Result VMCopy(const ProcessID proc, const API::Operation how, const Address ours, const Address theirs, const Size sz)
Prototype for user applications.
Definition: VMCopy.h:42
API::VMCopyNumber
@ VMCopyNumber
Definition: API.h:54