AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
syscall.h
Go to the documentation of this file.
1
#ifndef _SYS_SYSCALL_H
2
#define _SYS_SYSCALL_H
3
4
#include <
core/system.h
>
5
6
/* A system call table entry: it takes the arguments as they came in
7
* registers, and returns the result (negative: an errno). */
8
typedef
long (*
syscall_t
)(
uintptr_t
,
uintptr_t
,
uintptr_t
,
uintptr_t
,
uintptr_t
);
9
10
/* The table, and how many entries it has (sys/syscall.c). */
11
extern
const
syscall_t
syscall_table
[];
12
extern
const
size_t
syscall_cnt
;
13
14
/* Runs a system call made from user mode. */
15
void
syscall_dispatch
(
unsigned
long
nr,
uintptr_t
a1,
uintptr_t
a2,
uintptr_t
a3,
16
uintptr_t
a4,
uintptr_t
a5);
17
18
#endif
/* ! _SYS_SYSCALL_H */
system.h
uintptr_t
__SIZE_TYPE__ uintptr_t
Definition
stddef.h:12
syscall_table
const syscall_t syscall_table[]
Definition
syscall.c:197
syscall_t
long(*) syscall_t(uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t)
Definition
syscall.h:8
syscall_cnt
const size_t syscall_cnt
Definition
syscall.c:293
syscall_dispatch
void syscall_dispatch(unsigned long nr, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5)
Runs a system call that the current thread made from user mode.
Definition
syscall.c:313
kernel
include
sys
syscall.h
Generated by
1.18.0