diff options
Diffstat (limited to 'src/pkg/runtime/linux/thread.c')
| -rw-r--r-- | src/pkg/runtime/linux/thread.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/pkg/runtime/linux/thread.c b/src/pkg/runtime/linux/thread.c index 7166b0ef2..7c7ca7b4e 100644 --- a/src/pkg/runtime/linux/thread.c +++ b/src/pkg/runtime/linux/thread.c @@ -116,7 +116,7 @@ again:  	//  	// We only really care that (v&1) == 1 (the lock is held),  	// and in fact there is a futex variant that could -	// accomodate that check, but let's not get carried away.) +	// accommodate that check, but let's not get carried away.)  	futexsleep(&l->key, v+2);  	// We're awake: remove ourselves from the count. @@ -252,10 +252,10 @@ runtime·newosproc(M *m, G *g, void *stk, void (*fn)(void))  			stk, m, g, fn, runtime·clone, m->id, m->tls[0], &m);  	} -	ret = runtime·clone(flags, stk, m, g, fn); - -	if(ret < 0) -		*(int32*)123 = 123; +	if((ret = runtime·clone(flags, stk, m, g, fn)) < 0) { +		runtime·printf("runtime: failed to create new OS thread (have %d already; errno=%d)\n", runtime·mcount(), -ret); +		runtime·throw("runtime.newosproc"); +	}  }  void | 
