1# Copyright (c) 2017 Intel Corporation
2# Copyright (c) 2023 Meta
3# Copyright (c) 2024 Tenstorrent
4#
5# SPDX-License-Identifier: Apache-2.0
6
7menuconfig POSIX_BARRIERS
8	bool "POSIX barriers"
9	help
10	  Select 'y' here to enable POSIX barriers.
11
12	  For more information please see
13	  https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
14
15if POSIX_BARRIERS
16
17config MAX_PTHREAD_BARRIER_COUNT
18	int "Maximum number of POSIX barriers"
19	default 5
20	help
21	  Maximum simultaneously active pthread_barrier_t in a POSIX application.
22
23	  Note: this is a non-standard option.
24
25config PTHREAD_CREATE_BARRIER
26	bool "Use a POSIX barrier to serialize pthread_create()"
27	help
28	  When running several SMP applications in parallel instances of Qemu,
29	  e.g. via twister, explicit serialization may be required between
30	  pthread_create() and zephyr_thread_wrapper() when spawning and joining
31	  many pthreads concurrently.
32
33	  On such systems, say Y here to introduce explicit serialization
34	  via pthread_barrier_wait().
35
36module = PTHREAD_BARRIER
37module-str = POSIX thread barriers
38source "subsys/logging/Kconfig.template.log_config"
39
40endif # POSIX_BARRIERS
41