fix TTS_DTOR_ITERATIONS with bits file

This commit is contained in:
auronandace
2026-06-26 12:42:35 +01:00
parent fec9d49c18
commit 3cc24ddaee
7 changed files with 41 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html
#
# These types are split out to avoid importing all of limits.h into other headers.
#
# POSIX headers that require PTHREAD_DESTRUCTOR_ITERATIONS:
# - limits.h (where it should be defined)
# - threads.h (for TSS_DTOR_ITERATIONS)
include_guard = "_RELIBC_BITS_LIMITS_PTDI_H"
language = "C"
no_includes = true
cpp_compat = true
[enum]
prefix_with_name = true
+12
View File
@@ -0,0 +1,12 @@
//! `PTHREAD_DESTRUCTOR_ITERATIONS` for `limits.h` implementation.
//!
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/limits.h.html>.
use crate::platform::types::c_long;
/// Minimum required value for `PTHREAD_DESTRUCTOR_ITERATIONS`.
pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: c_long = 4;
/// Maximum number of attempts made to destroy a thread's thread-specific data
/// values on thread exit.
pub const PTHREAD_DESTRUCTOR_ITERATIONS: c_long = _POSIX_THREAD_DESTRUCTOR_ITERATIONS;