zephyr/lib/posix/options/Kconfig.rwlock
Chris Friedt 70e2b02c8e posix: deprecate PTHREAD_RWLOCK for POSIX_READER_WRITER_LOCKS
This change deprecates CONFIG_PTHREAD_RWLOCK in favour of
CONFIG_POSIX_READER_WRITER_LOCKS, which maps directly to the
name of the standard POSIX Option.

Annoyingly, the POSIX_RW_LOCKS Option Group is inconsistently
named. However, it is more convenient for us to use the Option
name since it is also the format used by the sysconf() variable
(_SC_READER_WRITER_LOCKS).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-04 16:27:12 -05:00

28 lines
737 B
Text

# Copyright (c) 2024 Meta
#
# SPDX-License-Identifier: Apache-2.0
menuconfig POSIX_READER_WRITER_LOCKS
bool "POSIX reader-writer locks"
default y if POSIX_API
help
Select 'y' here to enable POSIX reader-writer locks.
For more information please see
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
if POSIX_READER_WRITER_LOCKS
config MAX_PTHREAD_RWLOCK_COUNT
int "Maximum number of POSIX reader-writer locks"
default 5
help
Maximum simultaneously active reader-writer locks in a POSIX application.
Note: this is a non-standard option.
module = PTHREAD_RWLOCK
module-str = POSIX Reader-Writer Locks
source "subsys/logging/Kconfig.template.log_config"
endif # POSIX_READER_WRITER_LOCKS