#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/9/port/proc.c /sys/src/9/port/proc.c # srcdir: /n/juke/plan_9/sys/src/9/port # version: 845586056 # date: Thu Oct 17 17:00:56 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 845586056 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/9/port case 1 srcdir=$1 case * usage } if(! ~ $doextract yes){ echo This shell file contains a bundle of diffs representing changes echo to original source files in the Plan 9 distribution. It will run echo against the files in echo ' ' $srcdir echo '(unless overridden by the optional source directory argument)' echo and create a directory 845586056 containing the updated files. echo It will NOT automatically update the original files. echo echo Invoke with argument -X to perform the actual extraction. exit 0 } rm -rf 845586056 mkdir 845586056 target=845586056/proc.c echo -n '845586056/proc.c: ' if(! test -f $srcdir/proc.c || ! test -r $srcdir/proc.c){ echo $srcdir/proc.c unreadable exit unreadable } sum=`{sum < $srcdir/proc.c} if(! ~ d4143c7915168 $sum(1)^$sum(2)){ echo $srcdir/proc.c is not the original distribution file exit original } cp $srcdir/proc.c 845586056/proc.c ed 845586056/proc.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM proc.c' 693a unlock(&p->exl); . 691d 542a unlock(&p->rlock); splx(s); . 527,541c s = splhi(); lock(&p->rlock); r = p->r; if(r){ if(r->p != p || p->r != r || p->state != Wakeme) panic("postnote: state"); r->p = 0; p->r = 0; ready(p); . 479c unlock(&p->rlock); . 472c if(p == 0) return; s = splhi(); lock(&p->rlock); if(r->p == p && p->r == r){ . 469,470d 406c unlock(&p->rlock); . 403c lock(&p->rlock); . 386,387c p->r = r; unlock(&p->rlock); . 381,384d 371,372c r->p = 0; unlock(&p->rlock); . 364,365c s = splhi(); lock(&p->rlock); if(r->p){ print("double sleep %d %d\n", r->p->pid, p->pid); dumpstack(); } r->p = p; . 362d 322c p->mp = m; . wq //GO.SYSIN DD VADIM proc.c sum=`{sum < 845586056/proc.c} if(~ 7e3efbfd15121 $sum(1)^$sum(2)) echo if not{ echo 845586056/proc.c checksum error creating updated file exit checksum }