Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2020-08-29 22:08:31 +0300
committerCorinna Vinschen <corinna@vinschen.de>2020-08-30 15:27:43 +0300
commitb9ad0fbf286ada6cdb6b86f351196369cf703c73 (patch)
tree9de33906a1863e3ac80e90ed819ab8381b112d5c /winsup/cygwin/include
parent1cab6235274c974122cf4f0e7f85e03d332c354e (diff)
Cygwin: pthreads: iterate over key destructors per POSIX
POSIX requires that key destructors are called in a loop for each key with a non-NULL value until all values are NULL, or until all destructors for non-NULL values have been called at least PTHREAD_DESTRUCTOR_ITERATIONS (per POSIX: 4) times. Cygwinonly called all destructors with non-NULL values exactly once. This patch fixes Cygwin to follow POSIX. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/limits.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
index 524a469e4..6a55578f3 100644
--- a/winsup/cygwin/include/limits.h
+++ b/winsup/cygwin/include/limits.h
@@ -225,13 +225,8 @@ details. */
/* Maximum number of attempts made to destroy a thread's thread-specific
data values on thread exit. */
-/* FIXME: I really don't understand this value. Why should multiple
- attempts be necessary to destroy thread-specific data?!? Anyway, the
- current value here is 1, taken originally from our pthread.h file,
- where it was mistakenly defined first. Unfortunately this value is
- lower than the POSIX defined minimum value, which is 4. */
#undef PTHREAD_DESTRUCTOR_ITERATIONS
-#define PTHREAD_DESTRUCTOR_ITERATIONS 1
+#define PTHREAD_DESTRUCTOR_ITERATIONS 4
/* Maximum number of data keys that can be created by a process. */
/* Tls has 1088 items - and we don't want to use them all :] */