From 3a5fa7ed9020eaf8ab843a16d26db7393b2ec072 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Fri, 26 Aug 2011 10:08:29 -0400 Subject: 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) --- ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ide.c') diff --git a/ide.c b/ide.c index 4165831..e41437e 100644 --- a/ide.c +++ b/ide.c @@ -127,7 +127,7 @@ iderw(struct buf *b) { struct buf **pp; - if(!(b->flags & B_BUSY)) + if(!acquired_sleeplock(&b->sleeplock)) panic("iderw: buf not busy"); if((b->flags & (B_VALID|B_DIRTY)) == B_VALID) panic("iderw: nothing to do"); -- cgit v1.2.3