/* * header file to be used by applications. */ #ifndef _USER_LIB_H_ #define _USER_LIB_H_ #include "util/types.h" #include "kernel/proc_file.h" int printu(const char *s, ...); int exit(int code); void* naive_malloc(); void naive_free(void* va); int fork(); void yield(); // added @ lab4_1 int open(const char *pathname, int flags); int read_u(int fd, void *buf, uint64 count); int write_u(int fd, void *buf, uint64 count); int lseek_u(int fd, int offset, int whence); int stat_u(int fd, struct istat *istat); int disk_stat_u(int fd, struct istat *istat); int close(int fd); #endif