Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-1]: src/lib/libpthread Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/785497c62b40
branches:  netbsd-6-1
changeset: 775866:785497c62b40
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Sep 26 02:01:14 2013 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #959):
        lib/libpthread/pthread.c: revision 1.137
return errno if pthread_create hits the system limit, not just -1
(this is not entirely correct because it can return ENOMEM which is
not mentioned in the spec, but there are other places in pthread_create
whete ENOMEM is returned -- it at all, this should be fixed everywhere)

diffstat:

 lib/libpthread/pthread.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r de1eeb6d7702 -r 785497c62b40 lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c  Thu Sep 26 01:58:04 2013 +0000
+++ b/lib/libpthread/pthread.c  Thu Sep 26 02:01:14 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread.c,v 1.125.4.3 2013/04/29 01:50:19 riz Exp $    */
+/*     $NetBSD: pthread.c,v 1.125.4.3.2.1 2013/09/26 02:01:14 riz Exp $        */
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread.c,v 1.125.4.3 2013/04/29 01:50:19 riz Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.125.4.3.2.1 2013/09/26 02:01:14 riz Exp $");
 
 #define        __EXPOSE_STACK  1
 
@@ -443,6 +443,7 @@
                flag |= LWP_SUSPENDED;
        ret = _lwp_create(&newthread->pt_uc, flag, &newthread->pt_lid);
        if (ret != 0) {
+               ret = errno;
                pthread_mutex_lock(&newthread->pt_lock);
                /* Will unlock and free name. */
                pthread__reap(newthread);



Home | Main Index | Thread Index | Old Index