2 #include "syscall-stub.h"
3 #include "../syscall-nr.h"
15 syscall (SYS_exit, status);
20 exec (const char *file)
22 return syscall (SYS_exec, file);
28 return syscall (SYS_join, pid);
32 create (const char *file, unsigned initial_size)
34 return syscall (SYS_create, file, initial_size);
38 remove (const char *file)
40 return syscall (SYS_remove, file);
44 open (const char *file)
46 return syscall (SYS_open, file);
50 read (int fd, void *buffer, unsigned size)
52 return syscall (SYS_read, fd, buffer, size);
56 write (int fd, const void *buffer, unsigned size)
58 return syscall (SYS_write, fd, buffer, size);
62 seek (int fd, unsigned position)
64 syscall (SYS_seek, fd, position);
70 return syscall (SYS_tell, fd);
76 syscall (SYS_close, fd);
80 mmap (int fd, void *addr, unsigned length)
82 return syscall (SYS_mmap, fd, addr, length);
86 munmap (void *addr, unsigned length)
88 return syscall (SYS_munmap, addr, length);
92 chdir (const char *dir)
94 return syscall (SYS_chdir, dir);
98 mkdir (const char *dir)
100 return syscall (SYS_mkdir, dir);