2023-05-26 22:21:07 +03:00
|
|
|
#ifndef _SYS_SYSCALL_H
|
|
|
|
#define _SYS_SYSCALL_H 1
|
2023-04-12 17:53:02 +03:00
|
|
|
|
2023-05-26 22:21:07 +03:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
2024-02-12 21:47:40 +02:00
|
|
|
#define __SYSCALL_LIST(O) \
|
|
|
|
O(SYS_EXIT, exit) \
|
|
|
|
O(SYS_READ, read) \
|
|
|
|
O(SYS_WRITE, write) \
|
|
|
|
O(SYS_TERMID, termid) \
|
|
|
|
O(SYS_CLOSE, close) \
|
|
|
|
O(SYS_OPEN, open) \
|
|
|
|
O(SYS_OPENAT, openat) \
|
|
|
|
O(SYS_SEEK, seek) \
|
|
|
|
O(SYS_TELL, tell) \
|
|
|
|
O(SYS_GET_TERMIOS, gettermios) \
|
|
|
|
O(SYS_SET_TERMIOS, settermios) \
|
|
|
|
O(SYS_FORK, fork) \
|
|
|
|
O(SYS_EXEC, exec) \
|
|
|
|
O(SYS_SLEEP, sleep) \
|
|
|
|
O(SYS_WAIT, wait) \
|
|
|
|
O(SYS_FSTAT, fstat) \
|
|
|
|
O(SYS_READ_DIR, readdir) \
|
|
|
|
O(SYS_SET_UID, setuid) \
|
|
|
|
O(SYS_SET_GID, setgid) \
|
|
|
|
O(SYS_SET_EUID, seteuid) \
|
|
|
|
O(SYS_SET_EGID, setegid) \
|
|
|
|
O(SYS_SET_REUID, setreuid) \
|
|
|
|
O(SYS_SET_REGID, setregid) \
|
|
|
|
O(SYS_GET_UID, getuid) \
|
|
|
|
O(SYS_GET_GID, getgid) \
|
|
|
|
O(SYS_GET_EUID, geteuid) \
|
|
|
|
O(SYS_GET_EGID, getegid) \
|
|
|
|
O(SYS_GET_PWD, getpwd) \
|
|
|
|
O(SYS_SET_PWD, setpwd) \
|
|
|
|
O(SYS_CLOCK_GETTIME, clock_gettime) \
|
|
|
|
O(SYS_PIPE, pipe) \
|
|
|
|
O(SYS_DUP, dup) \
|
|
|
|
O(SYS_DUP2, dup2) \
|
|
|
|
O(SYS_KILL, kill) \
|
|
|
|
O(SYS_SIGNAL, signal) \
|
|
|
|
O(SYS_TCSETPGRP, tcsetpgrp) \
|
|
|
|
O(SYS_GET_PID, getpid) \
|
|
|
|
O(SYS_GET_PGID, getpgid) \
|
|
|
|
O(SYS_SET_PGID, setpgid) \
|
|
|
|
O(SYS_FCNTL, fcntl) \
|
|
|
|
O(SYS_NANOSLEEP, nanosleep) \
|
|
|
|
O(SYS_FSTATAT, fstatat) \
|
|
|
|
O(SYS_STAT, stat) \
|
|
|
|
O(SYS_SYNC, sync) \
|
|
|
|
O(SYS_MMAP, mmap) \
|
|
|
|
O(SYS_MUNMAP, munmap) \
|
|
|
|
O(SYS_TTY_CTRL, tty_ctrl) \
|
|
|
|
O(SYS_POWEROFF, poweroff) \
|
|
|
|
O(SYS_CHMOD, chmod) \
|
|
|
|
O(SYS_CREATE, create) \
|
|
|
|
O(SYS_CREATE_DIR, create_dir) \
|
|
|
|
O(SYS_UNLINK, unlink) \
|
|
|
|
O(SYS_READLINK, readlink) \
|
|
|
|
O(SYS_READLINKAT, readlinkat) \
|
|
|
|
O(SYS_MSYNC, msync) \
|
|
|
|
O(SYS_PREAD, pread) \
|
|
|
|
O(SYS_CHOWN, chown) \
|
|
|
|
O(SYS_LOAD_KEYMAP, load_keymap) \
|
|
|
|
O(SYS_SOCKET, socket) \
|
|
|
|
O(SYS_BIND, bind) \
|
|
|
|
O(SYS_SENDTO, sendto) \
|
|
|
|
O(SYS_RECVFROM, recvfrom) \
|
|
|
|
O(SYS_IOCTL, ioctl) \
|
|
|
|
O(SYS_ACCEPT, accept) \
|
|
|
|
O(SYS_CONNECT, connect) \
|
|
|
|
O(SYS_LISTEN, listen) \
|
|
|
|
O(SYS_PSELECT, pselect) \
|
2024-05-28 01:08:04 +03:00
|
|
|
O(SYS_TRUNCATE, truncate) \
|
2024-05-29 15:58:46 +03:00
|
|
|
O(SYS_SMO_CREATE, smo_create) \
|
2024-05-31 12:27:56 +03:00
|
|
|
O(SYS_SMO_DELETE, smo_delete) \
|
2024-05-29 15:58:46 +03:00
|
|
|
O(SYS_SMO_MAP, smo_map) \
|
2024-06-03 03:36:25 +03:00
|
|
|
O(SYS_ISATTY, isatty) \
|
2024-06-17 20:54:45 +03:00
|
|
|
O(SYS_GETSOCKNAME, getsockname) \
|
2024-06-17 20:56:48 +03:00
|
|
|
O(SYS_GETSOCKOPT, getsockopt) \
|
|
|
|
O(SYS_SETSOCKOPT, setsockopt) \
|
2024-02-12 21:47:40 +02:00
|
|
|
|
|
|
|
enum Syscall
|
|
|
|
{
|
|
|
|
#define O(enum, name) enum,
|
|
|
|
__SYSCALL_LIST(O)
|
|
|
|
#undef O
|
|
|
|
__SYSCALL_COUNT
|
|
|
|
};
|
2023-05-26 22:21:07 +03:00
|
|
|
|
|
|
|
__END_DECLS
|
|
|
|
|
|
|
|
#endif
|