Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/lib/libpthread/find if pthread_create() fails, displ...
details: https://anonhg.NetBSD.org/src/rev/afa64fa71787
branches: trunk
changeset: 752121:afa64fa71787
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Feb 16 00:15:19 2010 +0000
description:
if pthread_create() fails, display the iteration number in the error message.
diffstat:
regress/lib/libpthread/find/findthreads.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r f9b36ab76470 -r afa64fa71787 regress/lib/libpthread/find/findthreads.c
--- a/regress/lib/libpthread/find/findthreads.c Tue Feb 16 00:13:14 2010 +0000
+++ b/regress/lib/libpthread/find/findthreads.c Tue Feb 16 00:15:19 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: findthreads.c,v 1.1 2009/04/02 12:58:44 drochner Exp $ */
+/* $NetBSD: findthreads.c,v 1.2 2010/02/16 00:15:19 mrg Exp $ */
#include <err.h>
#include <pthread.h>
@@ -36,7 +36,7 @@
for (i = 0; i < NUM; i++) {
res = pthread_create(&thr[i], 0, f, 0);
if (res)
- errx(1, "pthread_create: %s", strerror(res));
+ errx(1, "pthread_create iter %d: %s", i, strerror(res));
for (j = 0; j <= i; j++) {
res = pthread_getname_np(thr[j], nam, sizeof(nam));
if (res) {
Home |
Main Index |
Thread Index |
Old Index