mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
tunables: Add support for tunables of uint64_t type
Recognize the uint64_t type in addition to the current int32_t and size_t. This allows addition of tunables of uint64_t types. In addition to adding the uint64_t type, this patch also consolidates validation and reading of integer types in tunables. One notable change is that of overflow computation in tunables_strtoul. The function was lifted from __internal_strtoul, but it does not need the boundary condition check (i.e. result == ULONG_MAX) since it does not need to set errno. As a result the check can be simplified, which I have now done. * elf/dl-tunable-types.h (tunable_type_code_t): New type TUNABLE_TYPE_UINT_64. * elf/dl-tunables.c (tunables_strtoul): Return uint64_t. Simplify computation of overflow. (tunable_set_val_if_valid_range_signed, tunable_set_val_if_valid_range_unsigned): Remove and replace with this... (TUNABLE_SET_VAL_IF_VALID_RANGE): ... New macro. (tunable_initialize): Adjust. Add uint64_t support. (__tunable_set_val): Add uint64_t support. * README.tunables: Document it.
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
typedef enum
|
||||
{
|
||||
TUNABLE_TYPE_INT_32,
|
||||
TUNABLE_TYPE_UINT_64,
|
||||
TUNABLE_TYPE_SIZE_T,
|
||||
TUNABLE_TYPE_STRING
|
||||
} tunable_type_code_t;
|
||||
|
Reference in New Issue
Block a user