mirror of
https://github.com/DoctorWkt/pdp7-unix.git
synced 2026-04-28 04:54:51 +00:00
More kernel comments: link.
This commit is contained in:
46
src/sys/s2.s
46
src/sys/s2.s
@@ -92,41 +92,41 @@
|
|||||||
jmp sysexit
|
jmp sysexit
|
||||||
|
|
||||||
.link:
|
.link:
|
||||||
jms arg
|
jms arg " Save the argument pointers in
|
||||||
dac 0f
|
dac 0f "0f, 1f and 2f
|
||||||
jms arg
|
jms arg
|
||||||
dac 1f
|
dac 1f
|
||||||
jms arg
|
jms arg
|
||||||
dac 2f
|
dac 2f
|
||||||
lac d4
|
lac d4 " Search the directory at i-num 4
|
||||||
jms namei; 0:0
|
jms namei; 0:0 " for the first argument
|
||||||
jms error
|
jms error " Didn't find it
|
||||||
jms namei; 1:0
|
jms namei; 1:0 " In the i-num found by 1st namei,
|
||||||
jms error
|
jms error " search for 2nd argument, err not found
|
||||||
dac u.base
|
dac u.base
|
||||||
jms copy; 2:0; name; 4
|
jms copy; 2:0; name; 4
|
||||||
lac u.cdir
|
lac u.cdir " Search the process' current directory
|
||||||
jms namei; name
|
jms namei; name " for the third argument
|
||||||
skp
|
skp
|
||||||
jms error
|
jms error " Error if it already exists
|
||||||
lac d1
|
lac d1
|
||||||
dac mode " save mode bits for access
|
dac mode " Save mode bits for access
|
||||||
jms access
|
jms access
|
||||||
jms dslot
|
jms dslot " ???
|
||||||
lac u.base
|
lac u.base " ???
|
||||||
jms iget
|
jms iget " ???
|
||||||
lac ii
|
lac ii " ???
|
||||||
dzm d.i
|
dzm d.i " Zero the i-num in the directory? Why?
|
||||||
jms copy; name; d.name; 4
|
jms copy; name; d.name; 4 " Copy the new link name into the directory entry
|
||||||
lac i.uniq
|
lac i.uniq " Copy the i-node unique number into
|
||||||
dac d.uniq
|
dac d.uniq " the directory entry
|
||||||
-1
|
-1
|
||||||
tad i.nlks " decrement link count!
|
tad i.nlks " Decrement link count, i.e. one more link
|
||||||
dac i.nlks
|
dac i.nlks
|
||||||
"** 01-s1.pdf page 9
|
"** 01-s1.pdf page 9
|
||||||
jms iput
|
jms iput " Save the i-node and directory entry for
|
||||||
jms dput
|
jms dput " the new link
|
||||||
jmp okexit
|
jmp okexit " and return OK
|
||||||
|
|
||||||
.unlink:
|
.unlink:
|
||||||
jms argname
|
jms argname
|
||||||
|
|||||||
Reference in New Issue
Block a user