A few now unused DOC

This commit is contained in:
Frans Kaashoek 2019-08-19 18:12:19 -04:00
parent ce565ae04a
commit 21ad8c76bc
2 changed files with 4 additions and 4 deletions

View file

@ -88,13 +88,13 @@ pipewrite(struct pipe *pi, uint64 addr, int n)
return -1; return -1;
} }
wakeup(&pi->nread); 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) if(copyin(pr->pagetable, &ch, addr + i, 1) == -1)
break; break;
pi->data[pi->nwrite++ % PIPESIZE] = ch; pi->data[pi->nwrite++ % PIPESIZE] = ch;
} }
wakeup(&pi->nread); //DOC: pipewrite-wakeup1 wakeup(&pi->nread);
release(&pi->lock); release(&pi->lock);
return n; return n;
} }

View file

@ -476,7 +476,7 @@ void
yield(void) yield(void)
{ {
struct proc *p = myproc(); struct proc *p = myproc();
acquire(&p->lock); //DOC: yieldlock acquire(&p->lock);
p->state = RUNNABLE; p->state = RUNNABLE;
sched(); sched();
release(&p->lock); release(&p->lock);
@ -531,7 +531,7 @@ sleep(void *chan, struct spinlock *lk)
p->chan = 0; p->chan = 0;
// Reacquire original lock. // Reacquire original lock.
if(lk != &p->lock){ //DOC: sleeplock2 if(lk != &p->lock){
release(&p->lock); release(&p->lock);
acquire(lk); acquire(lk);
} }