1 #ifndef __LIB_USER_SYSCALL_H
2 #define __LIB_USER_SYSCALL_H
8 #define PID_ERROR ((pid_t) -1)
10 void halt (void) NO_RETURN;
11 void exit (int status) NO_RETURN;
12 pid_t exec (const char *file);
14 bool create (const char *file, unsigned initial_size);
15 bool remove (const char *file);
16 int open (const char *file);
17 int filesize (int fd);
18 int read (int fd, void *buffer, unsigned length);
19 int write (int fd, const void *buffer, unsigned length);
20 void seek (int fd, unsigned position);
21 unsigned tell (int fd);
23 bool mmap (int fd, void *addr, unsigned length);
24 bool munmap (void *addr, unsigned length);
25 bool chdir (const char *dir);
26 bool mkdir (const char *dir);
29 #endif /* lib/user/syscall.h */