From ac4a5823ad9d1988214938f62e20175aa1e97d59 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 16 Feb 2010 00:15:19 +0000 Subject: [PATCH] if pthread_create() fails, display the iteration number in the error message. --- regress/lib/libpthread/find/findthreads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/lib/libpthread/find/findthreads.c b/regress/lib/libpthread/find/findthreads.c index 06a5a4952621..ac734500f4a0 100644 --- a/regress/lib/libpthread/find/findthreads.c +++ b/regress/lib/libpthread/find/findthreads.c @@ -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 #include @@ -36,7 +36,7 @@ main(int argc, char **argv) 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) {