commit | f19d56825d36b224a376b4012c7656871d9b1535 | [log] [tgz] |
---|---|---|
author | rsc <devnull@localhost> | Thu Jul 28 12:43:41 2005 +0000 |
committer | rsc <devnull@localhost> | Thu Jul 28 12:43:41 2005 +0000 |
tree | 8780f134d5679898214cb085cde0a8a4adb6cca6 | |
parent | d407972b54c11282a62788f5d1812ac6603c4234 [diff] [blame] |
different fix
diff --git a/src/libthread/BSD.c b/src/libthread/BSD.c index 8090ea5..3dbb3b2 100644 --- a/src/libthread/BSD.c +++ b/src/libthread/BSD.c
@@ -285,6 +285,9 @@ int i, npid, mypid; Proc *p; + if(msg == nil) + msg = ""; + /* * Only one guy, ever, gets to run this. * If two guys do it, inevitably they end up @@ -296,7 +299,9 @@ */ { static Lock onelock; - lock(&onelock); + if(!canlock(&onelock)) + _exits(threadexitsmsg); + threadexitsmsg = msg; } if(msg == nil)