1 #ifndef __LUNAIX_UNISTD_H
2 #define __LUNAIX_UNISTD_H
4 #include <lunaix/syscall.h>
5 #include <lunaix/types.h>
8 __LXSYSCALL(pid_t, fork)
10 __LXSYSCALL1(int, sbrk, void*, addr)
12 __LXSYSCALL1(void*, brk, unsigned long, size)
14 __LXSYSCALL(pid_t, getpid)
16 __LXSYSCALL(pid_t, getppid)
18 __LXSYSCALL(pid_t, getpgid)
20 __LXSYSCALL2(pid_t, setpgid, pid_t, pid, pid_t, pgid)
22 __LXSYSCALL1(void, _exit, int, status)
24 __LXSYSCALL1(unsigned int, sleep, unsigned int, seconds)
26 __LXSYSCALL(int, pause)
28 __LXSYSCALL2(int, kill, pid_t, pid, int, signum)
30 __LXSYSCALL1(unsigned int, alarm, unsigned int, seconds)
32 __LXSYSCALL2(int, link, const char*, oldpath, const char*, newpath)
34 __LXSYSCALL1(int, rmdir, const char*, pathname)
36 __LXSYSCALL3(int, read, int, fd, void*, buf, unsigned int, count)
38 __LXSYSCALL3(int, write, int, fd, void*, buf, unsigned int, count)
40 __LXSYSCALL3(int, readlink, const char*, path, char*, buf, size_t, size)
42 __LXSYSCALL3(int, lseek, int, fd, int, offset, int, options)
44 __LXSYSCALL1(int, unlink, const char*, pathname)
46 __LXSYSCALL1(int, close, int, fd)
48 __LXSYSCALL2(int, dup2, int, oldfd, int, newfd)
50 __LXSYSCALL1(int, dup, int, oldfd)
52 __LXSYSCALL1(int, fsync, int, fildes)
54 __LXSYSCALL2(int, symlink, const char*, pathname, const char*, link_target)
56 __LXSYSCALL1(int, chdir, const char*, path)
58 __LXSYSCALL1(int, fchdir, int, fd)
60 __LXSYSCALL2(char*, getcwd, char*, buf, size_t, size)
62 __LXSYSCALL2(int, rename, const char*, oldpath, const char*, newpath)
64 #endif /* __LUNAIX_UNISTD_H */