Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/lib/libpthread Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/2770a53a303e
branches: netbsd-6
changeset: 776467:2770a53a303e
user: riz <riz%NetBSD.org@localhost>
date: Thu Sep 26 02:03:09 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 5a633bb7912d -r 2770a53a303e lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c Thu Sep 26 01:55:13 2013 +0000
+++ b/lib/libpthread/pthread.c Thu Sep 26 02:03:09 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.4 2013/09/26 02:03:09 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.4 2013/09/26 02:03:09 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