Revise makefile structure.
[pintos-anon] / src / lib / user / syscall.h
1 #ifndef __LIB_USER_SYSCALL_H
2 #define __LIB_USER_SYSCALL_H
3
4 #include <stdbool.h>
5 #include <debug.h>
6
7 typedef int pid_t;
8
9 void halt (void) NO_RETURN;
10 void exit (int status) NO_RETURN;
11 pid_t exec (const char *file);
12 int join (pid_t);
13 bool create (const char *file);
14 bool remove (const char *file);
15 int open (const char *file);
16 int filesize (int fd);
17 int read (int fd, void *buffer, unsigned length);
18 int write (int fd, const void *buffer, unsigned length);
19 void seek (int fd, unsigned position);
20 unsigned tell (int fd);
21 void close (int fd);
22 bool mmap (int fd, void *addr, unsigned length);
23 bool munmap (void *addr, unsigned length);
24 bool chdir (const char *dir);
25 bool mkdir (const char *dir);
26 void lsdir (void);
27
28 #endif /* lib/user/syscall.h */