diff --git a/kernel/pipe.c b/kernel/pipe.c index c3a8acf..e358283 100644 --- a/kernel/pipe.c +++ b/kernel/pipe.c @@ -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; } diff --git a/kernel/proc.c b/kernel/proc.c index 3d65b46..428fdb0 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -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); }