110 likes | 287 Views
제 35 강 : Reading Code. Reading code. procedures. Reading Codes . . . read.c. src. #include "user.h" #include "sys.h" #include "type.h" int sys_read (pst) struct buf *pst; { char ps[MAX]; int index; while (i ... ) { ... }. sys. vm. net.
E N D
제35강 : Reading Code Reading code
Reading Codes . . . read.c src • #include "user.h" • #include "sys.h" • #include "type.h" • int sys_read (pst) • struct buf *pst; • { • char ps[MAX]; • int index; • while (i ... ) • { ... } sys vm net . . . . . sys.h inode.h user.h driver.c stream.c hd.c vm.h file.h error.h intrp.c signal.c strategy.c cdev.h bdev.h type.h read.c write.c sleep.c init.h flt.h mount hnfs.c super.c win.c obj.h text.h abs.h ftp.c telnet.c fill.c . . . . . . . .
Reading Codes . . . read.c • #include "user.h" • #include "sys.h" • #include "type.h" • int sys_read (pst) --------------- who calls this? • struct buf *pst; ------- what is “buf”? • { • char ps[MAX]; • int index; • while ((index < MAX ) && (read (temp) != LEVEL) ) { • . . . . • ------------ where is read()? • what does it perform? • }
src . . . . . include sys vm net Where is “readi()“, “proc” ? sys.h inode.h user.h driver.c stream.c hd.c vm.h file.h error.h intrp.c signal.c strategy.c cdev.h bdev.h type.h read.c write.c sleep.c init.h flt.h mount.h nfs.c super.c win.c obj.h text.h abs.h ftp.c telnet.c fill.c . . . . . . . . Manual or automatic search?
Repeated Primitive Operations Source change compile link/ load test/ run Managing Source Reading Codes Reading Manuals Compile Modifying Codes Dedugging Each Primitive Operation ---- 1 sec or 1 min?
Reading code • Back to Part (II) • regular expression • ctags • cscope • awk • … • Every repeated primitive operation 1 second!