Module Name: src Committed By: snj Date: Mon Jul 24 05:48:00 UTC 2017
Modified Files: src/lib/libpthread [netbsd-8]: pthread_tsd.c Log Message: Pull up following revision(s) (requested by kamil in ticket #119): lib/libpthread/pthread_tsd.c: revision 1.16 PR/52386: Use the number of iterations we document. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.8.1 src/lib/libpthread/pthread_tsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libpthread/pthread_tsd.c diff -u src/lib/libpthread/pthread_tsd.c:1.15 src/lib/libpthread/pthread_tsd.c:1.15.8.1 --- src/lib/libpthread/pthread_tsd.c:1.15 Tue Aug 25 13:46:23 2015 +++ src/lib/libpthread/pthread_tsd.c Mon Jul 24 05:47:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $ */ +/* $NetBSD: pthread_tsd.c,v 1.15.8.1 2017/07/24 05:47:59 snj Exp $ */ /*- * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $"); +__RCSID("$NetBSD: pthread_tsd.c,v 1.15.8.1 2017/07/24 05:47:59 snj Exp $"); /* Functions and structures dealing with thread-specific data */ #include <errno.h> @@ -332,7 +332,8 @@ pthread__destroy_tsd(pthread_t self) * a while.'' */ - iterations = 4; /* We're not required to try very hard */ + /* We're not required to try very hard */ + iterations = PTHREAD_DESTRUCTOR_ITERATIONS; do { done = 1; for (i = 0; i < pthread_keys_max; i++) { @@ -356,7 +357,7 @@ pthread__destroy_tsd(pthread_t self) (*destructor)(val); } } - } while (!done && iterations--); + } while (!done && --iterations); self->pt_havespecific = 0; pthread_mutex_lock(&self->pt_lock);