zephyr/lib/posix/Kconfig.pthread

44 lines
1.5 KiB
Text
Raw Normal View History

# Copyright (c) 2017 Intel Corporation
# Copyright (c) 2023 Meta
#
# SPDX-License-Identifier: Apache-2.0
TYPE = PTHREAD
type = pthread_t
type-function = pthread_create
source "lib/posix/Kconfig.template.pooled_ipc_type"
if PTHREAD
config PTHREAD_RECYCLER_DELAY_MS
int "Delay for reclaiming dynamic pthread stacks (ms)"
default 100
help
Prior to a POSIX thread terminating via k_thread_abort(), scheduled
work is added to the system workqueue (SWQ) so that any resources
allocated by the thread (e.g. thread stack from a pool or the heap)
can be released back to the system. Because resources are also freed
on calls to pthread_create() there is no need to worry about resource
starvation.
This option sets the number of milliseconds by which to defer
scheduled work.
Note: this option should be considered temporary and will likely be
removed once a more synchronous solution is available.
config POSIX_PTHREAD_ATTR_GUARDSIZE_DEFAULT
int "Default size of stack guard area"
range 0 65536
default 0
help
This is the default amount of space to reserve at the overflow end of a
pthread stack. Since Zephyr already supports both software-based stack
protection (canaries) and hardware-based stack protection (MMU or MPU),
this is set to 0 by default. However, a conforming application would be
required to set this to PAGESIZE. Eventually, this option might
facilitate a more dynamic approach to guard areas (via software or
hardware) but for now it simply increases the size of thread stacks.
endif