搜档网
当前位置:搜档网 › Pintosproject2 user_program

Pintosproject2 user_program

Pintosproject2 user_program
Pintosproject2 user_program

Sogang University Distributed Computing & Communication Lab.

9

structure (defined in pintos/src/thread/thread.h)

st t e(defined in pintos/s/th ead/th ead h)

UNIX system???process control block?????

thread?????????API ??thread.h??????.

Thi h l f ti i f l f d b

This help-function is very useful for debug

PHYS_BASE?????????????????.

process.c:static bool setup_stack(void **esp)

i b l k(id**)

()p

Useful API (2)-Example

fopen(…)

open(…)

filesys_open(…)

save syscall result;Linking

Libraries syscall3()

syscall

save syscall_result;end of syscall handler;

write(…)pushl int 0x30

ret

lib/user/syscall.h

Sogang University Distributed Computing & Communication Lab. 33

相关主题