-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.h
executable file
·49 lines (47 loc) · 1.47 KB
/
user.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
struct stat;
// system calls
int fork(void);
int exit(void) __attribute__((noreturn));
int wait(void);
int pipe(int*);
int write(int, void*, int);
int read(int, void*, int);
int close(int);
int kill(int);
int exec(char*, char**);
int open(char*, int);
int mknod(char*, short, short);
int unlink(char*);
int fstat(int fd, struct stat*);
int link(char*, char*);
int mkdir(char*);
int chdir(char*);
int dup(int);
int getpid(void);
char* sbrk(int);
int sleep(int);
int uptime(void);
int lseek(int, int, int);
int isatty(int);
int procstat(void); // New: Add in proyect 1: new system calls
int set_priority(int priority); // New: Add in proyect 2: new set_priority calls
int semget(int sem_id, int init_value); // New: Add in project final - (semaphore)
int semfree(int sem_id); // New: Add in project final - (semaphore)
int semdown(int sem_id); // New: Add in project final - (semaphore)
int semup(int sem_id); // New: Add in project final - (semaphore)
int shm_create(); // New: Add in project final - (shared memory)
int shm_close(int); // New: Add in project final - (shared memory)
int shm_get(int, char**); // New: Add in project final - (shared memory)
// ulib.c
int stat(char*, struct stat*);
char* strcpy(char*, char*);
void *memmove(void*, void*, int);
char* strchr(const char*, char c);
int strcmp(const char*, const char*);
void printf(int, char*, ...);
char* gets(char*, int max);
uint strlen(char*);
void* memset(void*, int, uint);
void* malloc(uint);
void free(void*);
int atoi(const char*);