Frans Kaashoek
3a5fa7ed90
Introduce and use sleeplocks instead of BUSY flags
...
Remove I_BUSY, B_BUSY, and intrans defs and usages
One spinlock per buf to avoid ugly loop in bget
fix race in filewrite (don't update f->off after releasing lock)
2011-08-26 10:08:29 -04:00
Russ Cox
1a81e38b17
make new code like old code
...
Variable declarations at top of function,
separate from initialization.
Use == 0 instead of ! for checking pointers.
Consistent spacing around {, *, casts.
Declare 0-parameter functions as (void) not ().
Integer valued functions return -1 on failure, 0 on success.
2011-01-11 13:01:13 -05:00
Robert Morris
7d7dc9331b
kalloc/kfree now only a page at a time
...
do not keep sorted contiguous free list
2010-08-31 12:54:47 -04:00
Russ Cox
48755214c9
assorted fixes:
...
* rename c/cp to cpu/proc
* rename cpu.context to cpu.scheduler
* fix some comments
* formatting for printout
2009-08-30 23:02:08 -07:00
Russ Cox
0aef891495
shuffle and tweak for formatting.
...
pdf has very good page breaks now.
would be a good copy for fall 2009.
2009-08-08 01:07:30 -07:00
Russ Cox
00e571155c
more doc tweaks
2009-07-12 18:33:37 -07:00
rsc
f3685aa391
simplify
2009-05-31 02:07:51 +00:00
kolya
e670a48358
as rtm noticed, avoid doubly-freeing pipe page
2008-10-15 17:42:56 +00:00
kolya
02cc595f28
clean up circular buffers, so pipe can queue 512 bytes rather than 511
2008-08-22 00:26:22 +00:00
rsc
5516be1fed
spaces around else for rtm
2007-08-28 18:37:41 +00:00
rsc
e4d6a21165
more consistent spacing
2007-08-28 18:32:08 +00:00
rsc
6eed1ee9b0
formatting
2007-08-28 05:00:53 +00:00
rsc
7834cca604
remove _ from pipe; be like file
2007-08-28 04:22:35 +00:00
rsc
558ab49f13
delete unnecessary #include lines
2007-08-27 23:26:33 +00:00
rsc
3ce1647078
nits
2007-08-27 16:06:19 +00:00
rsc
ea6e370964
i cannot prove that release before wakeup is wrong, but i cannot convince myself it is right either
2007-08-14 19:10:57 +00:00
rsc
f1f8dd91bc
formatting
2007-08-14 18:42:34 +00:00
rsc
b6095304b7
Make cp a magic symbol.
2007-08-10 16:37:27 +00:00
rsc
3bbbaca14d
move variable declaration up
2007-08-10 16:35:01 +00:00
rsc
22330658ff
spacing
2007-08-09 16:56:40 +00:00
rsc
f2f062da61
check p->killed for long-lived sleeps
2007-08-08 10:29:42 +00:00
rsc
2cbb4b1842
stop using fd to name files
2006-09-08 13:44:42 +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
d4c64e5d43
writeable => writable
2006-09-06 18:06:04 +00:00
rsc
9e9bcaf143
standardize various * conventions
2006-09-06 17:27:19 +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
bd228a8156
prevent longjmp / forkret from writing over tf->edi
2006-07-18 19:22:37 +00:00
rtm
46bbd72f3e
no more recursive locks
...
wakeup1() assumes you hold proc_table_lock
sleep(chan, lock) provides atomic sleep-and-release to wait for condition
ugly code in swtch/scheduler to implement new sleep
fix lots of bugs in pipes, wait, and exit
fix bugs if timer interrupt goes off in schedule()
console locks per line, not per byte
2006-07-15 12:03:57 +00:00
rtm
4e8f237be8
no more big kernel lock
...
succeeds at usertests.c pipe test
2006-07-12 01:48:35 +00:00
rtm
8b4e2a08fe
swtch saves callee-saved registers
...
swtch idles on per-CPU stack, not on calling process's stack
fix pipe bugs
usertest.c tests pipes, fork, exit, close
2006-07-01 21:26:01 +00:00
rtm
c41f1de5d4
file descriptors
...
pipes
2006-06-27 14:35:53 +00:00