/* Copyright (C) 2008 Emmanuel Varoquaux
This file is part of XOS.
This program 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
(at your option) any later version.
This program 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 this program. If not, see . */
#ifndef XOS_H
#define XOS_H
#include
#include
void __syscall_exit(int status) __attribute__ ((noreturn));
int __syscall_fork();
int __syscall_exec(const char *filename, char *const argv[], char *const envp[]);
int __syscall_getpid();
int __syscall_getpgid();
int __syscall_setpgid(int pid, int pgid);
int __syscall_chdir(const char *path);
int __syscall_sbrk(int increment, void **brk);
unsigned int __syscall_sleep(unsigned int seconds);
int __syscall_wait(int pid, int *status, int options);
int __syscall_kill(int pid, int sig);
int __syscall_uname(struct _xos_utsname_struct *name);
int __syscall_open(const char *filename, int flags);
int __syscall_close(int fd);
int __syscall_dup(int fd);
int __syscall_dup2(int fd, int newfd);
int __syscall_pipe(int fd[2]);
int __syscall_fcntl(int fd, int cmd, long arg);
int __syscall_read(int fd, char *buf, unsigned int count);
int __syscall_write(int fd, const char *buf, unsigned int count);
int __syscall_seek(int fd, long offset, int whence);
int __syscall_stat(int fd, struct _xos_stat_struct *buf);
int __syscall_ioctl(int fd, int request, void *arg);
int __syscall_create(const char *filename);
int __syscall_remove(const char *filename);
int __syscall_mkdir(const char *filename);
int __syscall_rmdir(const char *filename);
int __syscall_rename(const char *oldname, const char *newname);
int __syscall_mount(const char *device, const char *dir, const char *type);
int __syscall_umount(const char *dir);
int __syscall_reboot(int cmd);
int __syscall_gettime(long *time);
int __syscall_mmap(void *addr, unsigned int len, int prot, int fd, long off);
int __syscall_munmap(void *addr, unsigned int len);
int __syscall_mprotect(void *addr, unsigned int len, int prot);
#endif