os-k/include/kernel/ke/syscall.h

50 lines
2.5 KiB
C

//----------------------------------------------------------------------------//
// OS on Kaleid //
// //
// Desc: System call & userspace related functions //
// //
// //
// Copyright © 2018-2021 The OS/K Team //
// //
// This file is part of OS/K. //
// //
// OS/K is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License, or //
// any later version. //
// //
// OS/K is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY//without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------//
#ifndef _KERNEL_H
#include <kernel.h>
#endif
#ifndef _KALKERN_SYSCALL_H
#define _KALKERN_SYSCALL_H
//----------------------------------------------------------------------------//
#define LATEST_SYSCALL_CODE 3
//----------------------------------------------------------------------------//
extern error_t KeSyscall(ulong code);
extern void KeJumpToUserspace(ulong args, void *entryPoint, void *stackAddr);
error_t _KeSyscallHandler( ulong code, void *arg0, void *arg1, void *arg2,
ISRFrame_t *regs );
void KeEnableSyscalls();
//----------------------------------------------------------------------------//
#endif