add exercise of lab5 spoc discussion
This commit is contained in:
29
related_info/lab5/lab5-spoc-discuss/libs/unistd.h
Normal file
29
related_info/lab5/lab5-spoc-discuss/libs/unistd.h
Normal 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__ */
|
||||
|
||||
Reference in New Issue
Block a user