use Mpl and pl; drop Mreg and sr. Reference: /n/atom/patch/applied/9mcsclean Date: Sat Jun 7 18:03:03 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/9/port/mcslock.c Sat Jun 7 18:02:52 2014 +++ /sys/src/9/port/mcslock.c Sat Jun 7 18:02:53 2014 @@ -147,14 +147,14 @@ ilock(Lock *l) { uintptr pc; - Mreg s; + Mpl pl; LockEntry *ql; pc = getcallerpc(&l); - s = splhi(); + pl = splhi(); ql = allocle(l, pc); ql->isilock = 1; - ql->sr = s; + ql->pl = pl; /* the old taslock code would splx(s) to allow interrupts while waiting (if not nested) */ mcslock(l, ql); @@ -168,7 +168,7 @@ void iunlock(Lock *l) { - Mreg s; + Mpl pl; LockEntry *ql; if(islo()) @@ -181,12 +181,12 @@ m->machno, ql->m->machno, getcallerpc(&l)); } mcsunlock(l, ql); - s = ql->sr; + pl = ql->pl; ql->used = nil; m->ilockdepth--; if(up != nil) up->lastilock = nil; - splx(s); + splx(pl); } int --- /sys/src/9/port/portdat.h Sat Jun 7 18:02:55 2014 +++ /sys/src/9/port/portdat.h Sat Jun 7 18:02:56 2014 @@ -81,10 +81,7 @@ uint locked; Lock* used; int isilock; - union { /* GAK */ - Mpl pl; - Mreg sr; - }; + Mpl pl; /* for debugging */ uintptr pc; Proc* p;