From 12c407a42419514164b8f82ef202d73f6f7c9a09 Mon Sep 17 00:00:00 2001 From: Mike Makonnen Date: Sun, 25 May 2003 22:40:57 +0000 Subject: Return gracefully, rather than aborting, when the maximum concurrent threads per process has been reached. Return EAGAIN, as per spec. Approved by: re/blanket libthr --- lib/libthr/thread/thr_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libthr/thread/thr_init.c') diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 98b0eef7221b..9c334daf0d29 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -162,6 +162,7 @@ _thread_init(void) size_t len; int mib[2]; sigset_t set; + int error; struct clockinfo clockinfo; struct sigaction act; @@ -221,7 +222,7 @@ _thread_init(void) memset(pthread, 0, sizeof(struct pthread)); _thread_initial = pthread; - pthread->arch_id = _set_curthread(NULL, pthread); + pthread->arch_id = _set_curthread(NULL, pthread, &error); /* Get our thread id. */ thr_self(&pthread->thr_id); -- cgit v1.2.3