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_OPENAT, openat) \
|
|
|
|
O(SYS_SEEK, seek) \
|
|
|
|
O(SYS_TELL, tell) \
|
2024-07-30 11:10:43 +03:00
|
|
|
O(SYS_TCGETATTR, tcgetattr) \
|
|
|
|
O(SYS_TCSETATTR, tcsetattr) \
|
2024-02-12 21:47:40 +02:00
|
|
|
O(SYS_FORK, fork) \
|
|
|
|
O(SYS_EXEC, exec) \
|
|
|
|
O(SYS_SLEEP, sleep) \
|
|
|
|
O(SYS_WAIT, wait) \
|
|
|
|
O(SYS_READ_DIR, readdir) \
|
|
|
|
O(SYS_SET_UID, setuid) \
|
|
|
|
O(SYS_SET_GID, setgid) \
|
2024-08-11 00:58:12 +03:00
|
|
|
O(SYS_SET_SID, setsid) \
|
2024-02-12 21:47:40 +02:00
|
|
|
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) \
|
2024-12-02 03:59:23 +02:00
|
|
|
O(SYS_TCGETPGRP, tcgetpgrp) \
|
2024-02-12 21:47:40 +02:00
|
|
|
O(SYS_TCSETPGRP, tcsetpgrp) \
|
2024-12-02 05:55:25 +02:00
|
|
|
O(SYS_GET_PPID, getppid) \
|
2024-02-12 21:47:40 +02:00
|
|
|
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) \
|
2024-12-02 06:55:35 +02:00
|
|
|
O(SYS_FSTATVFSAT, fstatvfsat) \
|
2024-02-12 21:47:40 +02:00
|
|
|
O(SYS_SYNC, sync) \
|
|
|
|
O(SYS_MMAP, mmap) \
|
|
|
|
O(SYS_MUNMAP, munmap) \
|
|
|
|
O(SYS_TTY_CTRL, tty_ctrl) \
|
|
|
|
O(SYS_POWEROFF, poweroff) \
|
2024-09-17 17:16:46 +03:00
|
|
|
O(SYS_FCHMODAT, fchmodat) \
|
2024-02-12 21:47:40 +02:00
|
|
|
O(SYS_CREATE_DIR, create_dir) \
|
|
|
|
O(SYS_UNLINK, unlink) \
|
|
|
|
O(SYS_READLINKAT, readlinkat) \
|
|
|
|
O(SYS_MSYNC, msync) \
|
|
|
|
O(SYS_PREAD, pread) \
|
2024-09-17 18:35:01 +03:00
|
|
|
O(SYS_FCHOWNAT, fchownat) \
|
2024-02-12 21:47:40 +02:00
|
|
|
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-06-25 19:29:08 +03:00
|
|
|
O(SYS_REALPATH, realpath) \
|
2024-07-30 11:41:18 +03:00
|
|
|
O(SYS_TTYNAME, ttyname) \
|
2024-07-30 11:51:07 +03:00
|
|
|
O(SYS_ACCESS, access) \
|
2024-08-01 17:01:18 +03:00
|
|
|
O(SYS_SIGACTION, sigaction) \
|
|
|
|
O(SYS_SIGPENDING, sigpending) \
|
|
|
|
O(SYS_SIGPROCMASK, sigprocmask) \
|
2024-08-01 21:09:31 +03:00
|
|
|
O(SYS_SETITIMER, setitimer) \
|
2024-08-11 00:59:08 +03:00
|
|
|
O(SYS_POSIX_OPENPT, posix_openpt) \
|
|
|
|
O(SYS_PTSNAME, ptsname) \
|
2024-12-02 03:42:49 +02:00
|
|
|
O(SYS_FSYNC, fsync) \
|
2024-12-02 17:44:25 +02:00
|
|
|
O(SYS_SYMLINKAT, symlinkat) \
|
2024-12-03 16:07:30 +02:00
|
|
|
O(SYS_HARDLINKAT, hardlinkat) \
|
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
|