Commit Graph

16 Commits

Author SHA1 Message Date
Frans Kaashoek 1ddfbbb194 Revert "Introduce and use sleeplocks instead of BUSY flags"
My changes have a race with re-used bufs and the code doesn't seem to get shorter
Keep the changes that fixed ip->off race

This reverts commit 3a5fa7ed90.

Conflicts:

	defs.h
	file.c
	file.h
2011-08-29 17:18:40 -04:00
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 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
rsc 9b62657ecd formatting updates 2008-08-20 18:00:13 +00:00
rsc c2f354e4e1 clumsy blank pages to make some files align better 2007-08-28 05:00:39 +00:00
rsc 31085bb416 more comments 2006-09-07 14:12:30 +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
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 2927081628 uint32_t -> uint &c 2006-07-20 09:07:53 +00:00
rsc 0dd4253747 add ide_lock for sleep 2006-07-17 05:00:25 +00:00
rsc b5ee516575 add uint and standardize on typedefs instead of unsigned 2006-07-17 01:52:13 +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 8148b6ee53 i think my cmpxchg use was wrong in acquire
nesting cli/sti: release shouldn't always enable interrupts
separate setup of lapic from starting of other cpus, so cpu() works earlier
flag to disable locking in console output
make locks work even when curproc==0
(still crashes in clock interrupt)
2006-07-12 11:15:38 +00:00
rtm 664324745e cvs add spinlock.h
fix race in schedule()
2006-07-12 09:10:25 +00:00