| # Copyright (c) 2024 BayLibre SAS |
| # |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| menu "Sysconf support" |
| |
| config POSIX_SYSCONF |
| bool "Support for sysconf" |
| default y if POSIX_API |
| help |
| The sysconf() function provides a method for the application to determine |
| the current value of a configurable system limit or option (variable). |
| |
| config POSIX_PAGE_SIZE_BITS |
| int "Number of bits to use for PAGE_SIZE" |
| range 6 16 |
| default 12 if POSIX_API |
| default 6 |
| help |
| Define PAGE_SIZE as BIT(n), where n is the value configured here. |
| PAGE_SIZE is supported in the range [64, 65536] |
| If CONFIG_POSIX_API=y, PAGE_SIZE defaults to 4096, otherwise, it is 64 bytes. |
| |
| if POSIX_SYSCONF |
| |
| choice POSIX_SYSCONF_IMPL_CHOICE |
| default POSIX_SYSCONF_IMPL_FULL if CPP |
| default POSIX_SYSCONF_IMPL_MACRO |
| prompt "Sysconf implementation method" |
| |
| config POSIX_SYSCONF_IMPL_MACRO |
| bool "Macro" |
| help |
| The sysconf() function is implemented compile-time constant via macros. This is the option |
| with the least overhead. The downside is that sysconf() is not an addressable function. |
| |
| config POSIX_SYSCONF_IMPL_FULL |
| bool "Full" |
| help |
| The sysconf() function is implemented as a large integer-integer array. The advantage if this |
| option is that all sysconf() options can be queried and that the sysconf() symbol is |
| addressable. |
| |
| endchoice |
| |
| endif # POSIX_SYSCONF |
| |
| endmenu # "Sysconf support" |