diff options
author | mtm <mtm@FreeBSD.org> | 2003-05-25 22:40:57 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-05-25 22:40:57 +0000 |
commit | d8e0ed54e351db48278bd6693dde605fcda057df (patch) | |
tree | 8bc5a970789c8f2762484249a02b9ccd0ccb6ef6 /lib/libthr/thread/thr_init.c | |
parent | 54155a49a5a2b84f07b579c8e6af7e5f9c8e1d88 (diff) | |
download | FreeBSD-src-d8e0ed54e351db48278bd6693dde605fcda057df.zip FreeBSD-src-d8e0ed54e351db48278bd6693dde605fcda057df.tar.gz |
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
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 98b0eef..9c334da 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); |