plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 1aa9c533e0778d9917cdb19f71e3bc7416e8d528
parent 8b549a62142839c7e184939fe56850987dded578
Author: rsc <devnull@localhost>
Date:   Fri,  7 Jan 2005 20:52:07 +0000

allow lock passing

Diffstat:
Msrc/libthread/thread.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libthread/thread.c b/src/libthread/thread.c @@ -344,9 +344,10 @@ threadqunlock(QLock *l, ulong pc) { lock(&l->l); //print("qlock unlock %p @%#x by %p (owner %p)\n", l, pc, (*threadnow)(), l->owner); - if(l->owner != (*threadnow)()){ + if(l->owner == 0){ fprint(2, "%s: qunlock pc=0x%lux owner=%p self=%p oops\n", argv0, pc, l->owner, (*threadnow)()); + abort(); } if((l->owner = l->waiting.head) != nil){ delthread(&l->waiting, l->owner);