rsc
1d7839a1da
my mistake found by robert
2007-08-22 17:45:52 +00:00
rsc
eaea18cb9c
PDF at http://am.lcs.mit.edu/~rsc/xv6.pdf
...
Various changes made while offline.
+ bwrite sector argument is redundant; use b->sector.
+ reformatting of files for nicer PDF page breaks
+ distinguish between locked, unlocked inodes in type signatures
+ change FD_FILE to FD_INODE
+ move userinit (nee proc0init) to proc.c
+ move ROOTDEV to param.h
+ always parenthesize sizeof argument
2007-08-22 06:01:32 +00:00
rsc
f32f3638f4
Various cleanup:
...
- Got rid of dummy proc[0]. Now proc[0] is init.
- Added initcode.S to exec /init, so that /init is
just a regular binary.
- Moved exec out of sysfile to exec.c
- Moved code dealing with fs guts (like struct inode)
from sysfile.c to fs.c. Code dealing with system call
arguments stays in sysfile.c
- Refactored directory routines in fs.c; should be simpler.
- Changed iget to return *unlocked* inode structure.
This solves the lookup-then-use race in namei
without introducing deadlocks.
It also enabled getting rid of the dummy proc[0].
2007-08-21 19:22:08 +00:00
rsc
e2a620da49
checkpoint - simpler namei interface
2007-08-20 19:37:15 +00:00
rsc
07ddc0fa82
nit
2007-08-14 19:41:29 +00:00
rsc
2ef3a64bb4
Because limit gives the address of the last addressable
...
byte in the segment, the limit argument to SEG16 and SEG
needs to have 1 subtracted from it.
2007-08-14 04:55:45 +00:00
rsc
b6095304b7
Make cp a magic symbol.
2007-08-10 16:37:27 +00:00
rsc
9583b476bf
try to use cp only for curproc[cpu()]
2007-08-09 17:32:40 +00:00
rsc
f2f062da61
check p->killed for long-lived sleeps
2007-08-08 10:29:42 +00:00
rsc
c16e0916a7
cleaner table
2007-08-08 09:43:07 +00:00
rsc
19b1f63813
cleaner table
2007-08-08 09:42:36 +00:00
rsc
d80b06a1e0
iincref returns new ref
2007-08-08 09:30:42 +00:00
rsc
b6dc6187f7
add DPL_USER constant
2007-08-08 09:02:42 +00:00
rsc
00d0f794cf
fix various bugs
2007-08-08 08:57:37 +00:00
rsc
a7d18bb6f0
comment tweaks; more informative process list
2007-08-08 08:38:38 +00:00
rsc
1656b1b232
move growproc up higher
2006-09-08 14:26:51 +00:00
rsc
d911d83ca1
fix various comments
2006-09-08 13:55:43 +00:00
rsc
b6cac0a53b
check preconditions in sched
2006-09-07 16:54:00 +00:00
rsc
ab17e3198b
debugging prints
2006-09-07 15:45:38 +00:00
rsc
31085bb416
more comments
2006-09-07 14:12:30 +00:00
rsc
1133b215d8
more defensive programming
2006-09-07 01:56:22 +00:00
rsc
50e514be98
fd_* => file_*
2006-09-06 18:43:45 +00:00
rsc
9936bffa45
fd.* -> file.*
2006-09-06 18:40:28 +00:00
rsc
39593d2f1a
struct fd -> struct file
2006-09-06 18:38:56 +00:00
rsc
f552738889
no /* */ comments
2006-09-06 17:50:20 +00:00
rsc
9e9bcaf143
standardize various * conventions
2006-09-06 17:27:19 +00:00
rsc
0992df4b90
clear np->mem after freeing
2006-09-06 16:35:21 +00:00
kaashoek
21a88dd053
some pipe support in sh
...
bug in proc_wait
2006-09-06 15:32:21 +00:00
rtm
2aa4c3bc29
complain if no disk 1
...
lots of cleanup
2006-08-30 18:55:06 +00:00
rtm
18432ed5ed
nits
2006-08-29 21:35:30 +00:00
rtm
7a37578e9e
clear killed flag in exit
...
idecref cwd in exit
2006-08-29 19:59:52 +00:00
rtm
dfcc5b997c
prune unneeded panics and debug output
2006-08-29 19:06:37 +00:00
rtm
3b95801add
i broke sbrk, fix it
2006-08-29 17:01:40 +00:00
rtm
2b19190c13
clean up stale error checks and panics
...
delete unused functions
a few comments
2006-08-29 14:45:45 +00:00
kaashoek
81d5219998
bug in sbrk
...
test malloc
2006-08-24 19:24:36 +00:00
kaashoek
ea2909b6b5
user-level malloc (untested)
...
nit in sbrk
indirect block
fix dup to share fd struct
2006-08-24 02:44:41 +00:00
kaashoek
8b58e81077
i/o redirection in sh
...
better parsing of sh commands (copied from jos sh)
cat: read from 1 if no args
sbrk system call, but untested
getpid system call
moved locks in keyboard intr, but why do we get intr w. null characters from keyboard?
2006-08-23 01:09:24 +00:00
kaashoek
8787cd01df
chdir
...
cd in shell
nits in mkdir, ls, etc.
2006-08-19 23:41:34 +00:00
rtm
350e63f7a9
no more proc[] entry per cpu for idle loop
...
each cpu[] has its own gdt and tss
no per-proc gdt or tss, re-write cpu's in scheduler (you win, cliff)
main0() switches to cpu[0].mpstack
2006-08-15 22:18:20 +00:00
kaashoek
e958c538fa
commented out code for cwd
2006-08-15 15:53:46 +00:00
rtm
9e5970d596
link()
2006-08-13 02:12:44 +00:00
rtm
5be0039ce9
interrupts could be recursive since lapic_eoi() called before rti
...
so fast interrupts overflow the kernel stack
fix: cli() before lapic_eoi()
2006-08-10 22:08:14 +00:00
rtm
0e84a0ec6e
fix race in holding() check in acquire()
...
give cpu1 a TSS and gdt for when it enters scheduler()
and a pseudo proc[] entry for each cpu
cpu0 waits for each other cpu to start up
read() for files
2006-08-08 19:58:06 +00:00
rtm
32630628a9
open()
2006-07-29 09:35:02 +00:00
rtm
c59361f143
primitive exec
2006-07-27 21:10:00 +00:00
rtm
bd228a8156
prevent longjmp / forkret from writing over tf->edi
2006-07-18 19:22:37 +00:00
rsc
0dd4253747
add ide_lock for sleep
2006-07-17 05:00:25 +00:00
rsc
b5f17007f4
standarize on unix-like lowercase struct names
2006-07-17 01:58:13 +00:00
rsc
b5ee516575
add uint and standardize on typedefs instead of unsigned
2006-07-17 01:52:13 +00:00
rsc
ee9c7f3bfc
goodbye PushRegs
2006-07-17 01:36:39 +00:00