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);
52 return syscall (SYS_filesize, fd);
56 read (int fd, void *buffer, unsigned size)
58 return syscall (SYS_read, fd, buffer, size);
62 write (int fd, const void *buffer, unsigned size)
64 return syscall (SYS_write, fd, buffer, size);
68 seek (int fd, unsigned position)
70 syscall (SYS_seek, fd, position);
76 return syscall (SYS_tell, fd);
82 syscall (SYS_close, fd);
86 mmap (int fd, void *addr, unsigned length)
88 return syscall (SYS_mmap, fd, addr, length);
92 munmap (void *addr, unsigned length)
94 return syscall (SYS_munmap, addr, length);
98 chdir (const char *dir)
100 return syscall (SYS_chdir, dir);
104 mkdir (const char *dir)
106 return syscall (SYS_mkdir, dir);