20 #ifndef SYSTEM_SYSCALLS_H 21 #define SYSTEM_SYSCALLS_H 23 #include "pedigree/kernel/processor/Processor.h" 24 #include "pedigree/kernel/processor/VirtualAddressSpace.h" 25 #include "pedigree/kernel/processor/state.h" 29 #include <sys/types.h> 36 uintptr_t posix_brk(uintptr_t theBreak);
37 long posix_sbrk(
int delta);
39 SyscallState &state,
unsigned long flags,
void *child_stack,
int *ptid,
40 int *ctid,
unsigned long newtls);
41 int posix_fork(SyscallState &state);
43 const char *name,
const char **argv,
const char **env, SyscallState &state);
44 int posix_waitpid(
const int pid,
int *status,
int options);
45 int posix_exit(
int code,
bool allthreads =
true)
NORETURN;
49 int posix_gettimeofday(timeval *tv, struct timezone *tz);
50 int posix_settimeofday(const timeval *tv, const struct timezone *tz);
51 time_t posix_time(time_t *tval);
52 clock_t posix_times(struct tms *tm);
53 int posix_getrusage(
int who, struct rusage *r);
55 int posix_getpwent(passwd *pw,
int n,
char *str);
56 int posix_getpwnam(passwd *pw, const
char *name,
char *str);
59 uid_t posix_geteuid();
60 gid_t posix_getegid();
61 int posix_setuid(uid_t uid);
62 int posix_setgid(gid_t gid);
63 int posix_seteuid(uid_t euid);
64 int posix_setegid(gid_t egid);
66 size_t posix_alarm(uint32_t seconds);
67 int posix_sleep(uint32_t seconds);
68 int posix_usleep(
size_t useconds);
69 int posix_nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
70 int posix_clock_gettime(clockid_t clock_id, struct timespec *tp);
72 int pedigree_sigret();
75 int posix_setpgid(
int pid,
int pgid);
77 int posix_getpgid(
int pid);
79 mode_t posix_umask(mode_t mask);
81 int posix_getgrnam(const
char *name, struct group *out);
82 int posix_getgrgid(gid_t
id, struct group *out);
84 int posix_linux_syslog(
int type,
char *buf,
int len);
85 int posix_syslog(const
char *msg,
int prio);
87 int pedigree_login(
int uid, const
char *password);
89 int pedigree_reboot();
91 int posix_uname(struct utsname *n);
94 int option, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5);
95 int posix_arch_prctl(
int code,
unsigned long addr);
99 int posix_setgroups(
size_t size, const gid_t *list);
100 int posix_getgroups(
size_t size, gid_t *list);
102 int posix_getrlimit(
int resource, struct rlimit *rlim);
103 int posix_setrlimit(
int resource, const struct rlimit *rlim);
104 int posix_getpriority(
int which,
int who);
105 int posix_setpriority(
int which,
int who,
int prio);
107 int posix_setreuid(uid_t ruid, uid_t euid);
108 int posix_setregid(gid_t rgid, gid_t egid);
110 int posix_setresuid(uid_t ruid, uid_t euid, uid_t suid);
111 int posix_setresgid(gid_t rgid, gid_t egid, gid_t sgid);
112 int posix_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
113 int posix_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
115 int posix_get_robust_list(
116 int pid, struct robust_list_head **head_ptr,
size_t *len_ptr);
117 int posix_set_robust_list(struct robust_list_head *head,
size_t len);
119 int posix_ioperm(
unsigned long from,
unsigned long num,
int turn_on);
120 int posix_iopl(
int level);
122 int posix_getitimer(
int which, struct itimerval *curr_value);
124 int which, const struct itimerval *new_value, struct itimerval *old_value);
126 int posix_capget(
void *hdrp,
void *datap);
127 int posix_capset(
void *hdrp, const
void *datap);