Add functional tests for pthread_getconcurrency() and
pthread_setconcurrency().
Note: the specification explicitly says
> an implementation can always ignore any calls to
> pthread_setconcurrency() and return a constant for
> pthread_getconcurrency()
The implementation and tests could be up for revision at a future
time when optimizations are considered and there is a better
system in placeo for documenting POSIX options and deviations.
Any such optimizations should be explicitly controlled via
Kconfig.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Zephyr must support all functionality of the XSI_THREADS_EXT
subprofiling option group in order to claim it supports that
subprofiling option group.
The XSI_THREADS_EXT option group is critical to be able to
run POSIX threads with statically allocated thread stacks, which
has been a feature of the implementation since it was initially
added.
The pthread_getconcurrency() and pthread_setconcurrency()
functions are the only remaining, unimplemented functions of
the XSI_THREADS_EXT option group.
Implement pthread_getconcurrency() and pthread_setconcurrency()
via the more "posixly correct" interpretation of the
specification.
I.e. as the pthread_t:k_thread relationship is 1:1 and not M:N,
Zephyr does not support multiplexing of user threads on top of
schedulable kernel entities (i.e. "user threads" are directly
mapped to native threads, just like linuxthreads or NPTL are in
Linux).
For that reason, to be "posixly correct", we should save the
provided value via pthread_setconcurrency(), in the absense of
errors, and also return that same value back via
pthread_getconcurrency(), even though that serves zero purpose
in Zephyr for the foreseeable future.
Note: the specification also states
"an implementation can always ignore any calls to
pthread_setconcurrency() and return a constant for
pthread_getconcurrency()."
For that reason, the implementation may be revisited at a later
time when when considering optimizations and when there is a
better system in place for documenting deviations.
Any such optimization should be explicitly controlled via
Kconfig.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The number of IRQ priority bits was incorrectly set to 3 instead
of 2, which is the correct number for Cortex-M0+.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Add the missing dependency of the node status value
and enable the driver by default when they are met.
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
After porting from h5 to f7 i noticed that not all mcus have
cpu node labels. Added cpu0 node labels to all stm32 dts.
Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
Introduce NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.
This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Most x86 build configurations enable the UART console. Since EFI console
has also defaulted to enabled, this means that the EFI covers the early
part of the boot until UART takes over.
This is all fine, except that enabling EFI console has the effect of
disabling PRINTK_SYNC. This in turn has the effect of causing garbled
output over UART, which has led to several bug reports on x86 platforms
(in particular on up_squared).
Since EFI console should really only be used for early platform bringup
and debugging purposes, it's not really ideal to unconditionally have it
enabled by default. Instead, change the default enabling to be
conditional to the UART console being disabled.
Fixes#54861Fixes#55071
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Fix this test for the native_simulator,
and add it as a default test target.
Also be a bit clearer in stdout about the test having
passed or not.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the init_prioties related cmake targets so they also
work with native_simulator based build targets.
Mostly this consists of pointing to the right file
(final build result instead of intermediate elf library)
and setting the dependency to that final build result.
Note that for the native_simulator based targets
the init priorities check can only be run on build
if we are building the final image (not just a partial
prelinked library),
and we are not assembling several images together
into one executable.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Revert "drivers: timer: lptim timer clock on stm32u5 has a prescaler"
This reverts commit c14670abea.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Revert "dts: bindings: LPtimer of stm32 has a x2 factor on its clock"
The stm32u5 lptim clock source has no prescaler to divide the
the LPTIM input clock frequency : no property required.
This reverts commit 572b286010.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add fixture to test suite to allow for and signal that the test
must be run on real hardware.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The description of `STM32_EXTI_TRIG_FALLING` got copied into
the `STM32_EXTI_TRIG_BOTH` as well, fix that.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Get the native_posix DTS from native_sim instead of
the oposite. As native_sim is now the default test platform.
Note this commit is practically just swapping files.
There is no changes to the DTS content, beyond
changing the board name.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
- Fixed a few improperly formatted struct
- Marked some mask definitions as internal when macros abstracting them
out already exist
- Fixed a few code blocks to add proper syntax highlightingy
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes the routing of the events associated with a secondary
i2c target address being routed to the primary config. The
i2c_target_config/slave_cfg was being selected from the
driver address match but then over written by the primary.
This change fully implements the if/else of 10bit addressing
and includes a assert if the slave_cfg is NULL, and explains
why dual 10bit addresses on STM32 won't work.
Signed-off-by: Tim Woolliscroft <tim@opteran.com>
This removes spurious error message printed when CIS has been
disconnected and it was not used by any of the endpoints.
This case is valid and may happen on Connection Timeout when the
controller reports ACL Disconnection first.
When the CIS Disconnection is reported after, the ASE is already in idle
state and the referenece to CIS has been already removed (on ACL
disconnection).
Fixes: #64896
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Using Connection Manager, it's easy to run lwm2m sample on
devices supporting different connectivity technologies
(for example, Wi-Fi and LTE).
Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
alarm setting function checks channel callback and it returns -EBUSY
if callback is registered. but alarm cancel function doesn't clear
callback function. this prevents from alarm setting after alarm cancel
Signed-off-by: Minho Jin <kilejin@gmail.com>
This driver assumed the ivshmem-v2 output sections would be mapped
contiguously, which is no longer true.
Modify eth_ivshmem to treat each output section independently
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Recent changes to the arm64 MMU code mean that you can no longer map
R/O memory as R/W. Mapping R/W memory now causes a cache invalidation
instruction (DC IVAC) that requires write permissions or else a fault
is generated.
Modify ivshmem-v2 to map each R/O and R/W section individually
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Revert back to implementation that did early abort of
previous prepare when a short prepare is enqueued.
Adds back implementation deleted in
commit 7f388bb70a ("Bluetooth: Controller: Fix short
prepare when many enqueued in pipeline").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Minor refactor of Kconfig order such that the advanced
feature Kconfig is just above the enabling/visible of the
advanced features menu.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Drops calling the UART FIFO read function during the setup
function (when not in async mode) which could cause issues on
some devices since this function is not called in an ISR.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
introduce global DSP_SHARING and CPU_HAS_DSP to be used by all
architectures and change existing usage in ARC to use those global
configs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some thread options were made architecture specific, i.e. K_ARC_DSP_IDX. We
have other architectures with similar functionality and we need to be
architecture agnostic at this level.
Changed the option to be more generic. The option is now called K_DSP_IDX.
Also remove multiple level of ifdefs and guards around those defines to
allow for documentation to be published and added a note about required
configs in the docstring.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Previously pthread_attr_getguardsize() and
pthread_attr_setguardsize() were part of the
XSI_THREADS_EXT option group. That is no longer the case.
In IEEE 1003.1-2017 they are part of the POSIX_THREADS_EXT
option group.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The function pthread_setcanceltype() is supported and mandatory
for conforming implementations.
Mark it as supported since the preceding commit.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The function pthread_setcancelstate() has been supported for
some time already in Zephyr. For some reason, it was not being
checked in the "headers" testsuite.
Additionally, check for pthread_setcanceltype() since it was
added in a prior commit.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
pthread_setcanceltype() is required by the POSIX_THREADS_BASE
Option Group as detailed in Section E.1 of IEEE-1003.1-2017.
The POSIX_THREADS_BASE Option Group is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The parity, stop bits and data bits config was hard-coded instead of
taken from the device tree.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
This fixes a bug where a newly created documentation file not yet
tracked by git would cause the documentation generation to fail.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>