| 
    CS318 - Pintos
    
   Pintos source browser for JHU CS318 course 
   | 
 
 
 
 
Go to the documentation of this file.    1 #ifndef __LIB_USER_SYSCALL_H 
    2 #define __LIB_USER_SYSCALL_H 
    9 #define PID_ERROR ((pid_t) -1) 
   13 #define MAP_FAILED ((mapid_t) -1) 
   16 #define READDIR_MAX_LEN 14 
   19 #define EXIT_SUCCESS 0           
   20 #define EXIT_FAILURE 1           
   27 bool create (
const char *
file, 
unsigned initial_size);
 
   31 int read (
int fd, 
void *
buffer, 
unsigned length);
 
   32 int write (
int fd, 
const void *
buffer, 
unsigned length);
 
   33 void seek (
int fd, 
unsigned position);
 
   34 unsigned tell (
int fd);
 
 
void seek(int fd, unsigned position)
 
int read(int fd, void *buffer, unsigned length)
 
bool remove(const char *file)
 
void halt(void) NO_RETURN
Projects 2 and later.
 
bool create(const char *file, unsigned initial_size)
 
bool mkdir(const char *dir)
 
bool readdir(int fd, char name[READDIR_MAX_LEN+1])
 
bool chdir(const char *dir)
Project 4 only.
 
int inumber(int fd)
lib/user/syscall.h
 
void exit(int status) NO_RETURN
 
pid_t exec(const char *file)
 
mapid_t mmap(int fd, void *addr)
Project 3 and optionally project 4.
 
int open(const char *file)
 
#define READDIR_MAX_LEN
Maximum characters in a filename written by readdir().
 
int pid_t
Process identifier.
 
int write(int fd, const void *buffer, unsigned length)
 
int mapid_t
Map region identifier.