add exercise of lab5 spoc discussion

This commit is contained in:
yuchen
2015-04-20 12:44:41 +08:00
parent 331b8dff5a
commit f39299c9a2
104 changed files with 12528 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#ifndef __LIBS_UNISTD_H__
#define __LIBS_UNISTD_H__
#define T_SYSCALL 0x80
/* syscall number */
#define SYS_exit 1
#define SYS_fork 2
#define SYS_wait 3
#define SYS_exec 4
#define SYS_clone 5
#define SYS_yield 10
#define SYS_sleep 11
#define SYS_kill 12
#define SYS_gettime 17
#define SYS_getpid 18
#define SYS_brk 19
#define SYS_mmap 20
#define SYS_munmap 21
#define SYS_shmem 22
#define SYS_putc 30
#define SYS_pgdir 31
/* SYS_fork flags */
#define CLONE_VM 0x00000100 // set if VM shared between processes
#define CLONE_THREAD 0x00000200 // thread group
#endif /* !__LIBS_UNISTD_H__ */