A few now unused DOC
This commit is contained in:
parent
ce565ae04a
commit
21ad8c76bc
|
@ -88,13 +88,13 @@ pipewrite(struct pipe *pi, uint64 addr, int n)
|
|||
return -1;
|
||||
}
|
||||
wakeup(&pi->nread);
|
||||
sleep(&pi->nwrite, &pi->lock); //DOC: pipewrite-sleep
|
||||
sleep(&pi->nwrite, &pi->lock);
|
||||
}
|
||||
if(copyin(pr->pagetable, &ch, addr + i, 1) == -1)
|
||||
break;
|
||||
pi->data[pi->nwrite++ % PIPESIZE] = ch;
|
||||
}
|
||||
wakeup(&pi->nread); //DOC: pipewrite-wakeup1
|
||||
wakeup(&pi->nread);
|
||||
release(&pi->lock);
|
||||
return n;
|
||||
}
|
||||
|
|
|
@ -476,7 +476,7 @@ void
|
|||
yield(void)
|
||||
{
|
||||
struct proc *p = myproc();
|
||||
acquire(&p->lock); //DOC: yieldlock
|
||||
acquire(&p->lock);
|
||||
p->state = RUNNABLE;
|
||||
sched();
|
||||
release(&p->lock);
|
||||
|
@ -531,7 +531,7 @@ sleep(void *chan, struct spinlock *lk)
|
|||
p->chan = 0;
|
||||
|
||||
// Reacquire original lock.
|
||||
if(lk != &p->lock){ //DOC: sleeplock2
|
||||
if(lk != &p->lock){
|
||||
release(&p->lock);
|
||||
acquire(lk);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue