The POSIX standard doesn't specify if the argument to store
previous state/type in
`pthread_setcancelstate`/`pthread_setcancelstate` can be
`NULL`, but threading implementations in Linux & Apache NuttX
permit the arguments to be `NULL`.
This commit changes Zephyr's implementation to mimic that of
Linux & NuttX, so that user do not get caught off-guard by
NULL pointer dereferencing when porting code over from those
OSes.
Updated test accordingly.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Always pull from the channel queue from the system workqueue context.
This simplifies debugging.
This also allows us to remove `sent` from the metadata struct.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Separate most of the param checking in `bt_l2cap_chan_send()`, with the
logic in `bt_l2cap_dyn_chan_send()`.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Fix missing ISO Synchronized Receiver radio event time
reservation that did not calculate for all the subevents.
Introduce BT_CTLR_SYNC_ISO_RESERVE_MAX Kconfig option to
allow using a minimal time reservation if needed to allow
other role to pre-empt ISO Synchronized Receiver in
pre-transmission and control subevents.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Allow the driver to compile without `CONFIG_NET_NATIVE_IPV4`. This can
happen if the driver is only desired for SSID scanning.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Rather than duplicating the same schema, define it only once and reuse
for both common section and tests section.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Extend api test suite to cover the new devicetree macros. This
includes extending the devicetree overlay with two new bindings:
- GPIO device which is also an interrupt controller
- interrupt holder using interrupts-extended to point to both
existing interrupt controller test_intc, and the newly added
GPIO device
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add the following macros to devicetree.h to get an interrupt
specifier's interrupt controller:
DT_IRQ_INTC_BY_IDX(node_id, idx)
DT_IRQ_INTC_BY_NAME(node_id, name)
DT_IRQ_INTC(node_id)
and their INST variants
DT_INST_INTC_BY_IDX(inst, idx)
DT_INST_INTC_BY_NAME(inst, name)
DT_INST_IRQ(inst)
which use the newly generated _CONTROLLER output from the
previous commit.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Extend the gen_defines.py write_interrupts(node) function to
generate macros to get the interrupt controller for an
interrupt specifier by idx and by name.
The information is already generated by edtlib.py and stored in
node.interrupts[].controller. This addition uses the node pointed
to by the controller member to generate the following example output
define DT_N_S_device1_IRQ_IDX_0_CONTROLLER \
DT_N_S_gpio_800
define DT_N_S_device1_IRQ_NAME_test4_CONTROLLER \
N_S_device1_IRQ_IDX_0_CONTROLLER
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Updated the files present in gecko/se_manager folder in Silabs HAL
as per latest version of gecko_sdk.
Signed-off-by: Sateesh Kotapati <sateesh.kotapati@silabs.com>
As there isn't any ZTEST under the `posix_apis` testsuite, its
the testsuite is skipped and its setup function never ran,
let's convert the fdtable initialization setup function into a
test of `posix_apis`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Currently all components live under the `posix_apis` testsuite,
this commit split them into a testsuite of their own.
This commit also prefixed a few local functions/variables with
the `static` keyword.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Make sure that the POSIX clock base is reset after every
testsuite so that the initial time is the same for every test.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add flash partitions required to use the board with MCUboot.
Also fix the chosen zephyr,code-partition devicetree node and point it
to slot0_partition.
Signed-off-by: Martin Jäger <martin@libre.solar>
Add flash partitions required to use the board with MCUboot.
Also fix the chosen zephyr,code-partition devicetree node and point it
to slot0_partition.
Signed-off-by: Martin Jäger <martin@libre.solar>
Master Inter-Data Idleness and Master SS Idleness
can configure with STM32 low level spi driver apis.
Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
add Master Inter-Data Idleness and
Master SS Idleness field. That fields
are integers.
Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
wsr.UPPERCASE can lead to compiler errors when UPPERCASE matches
a macro defined in the special register header file.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
rsr.UPPERCASE can lead to compiler errors when UPPERCASE matches
a macro defined in the special register header file.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Use 'switch' to emphasise that we're handling different values of
'state' in pm_state_set().
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
'ret' in pm_state_set() is always set before it's used, no need to
initialise it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If runtime_suspend() is called early during Zephyr initialisation,
while k_is_pre_kernel() returns 'true,' 'async' is set to 'false,' so
if 'async' is 'true,' Zephyr initialisation is definitely complete,
so there is no need to check k_is_pre_kernel() again.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use proper errno.h error codes in pd_intel_adsp_set_power_enable()
instead of -1.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If user has not supplied address pointer when calling accept(),
then we would not be able to figure out the used socket domain
properly. But as there is now SO_DOMAIN option supported, use
that to get the correct socket domain.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make sure that the SO_DOMAIN is a read only value and it
returns correct socket domain (AF_INET or AF_INET6) in the
tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The getsockopt() will return the address domain of the given
socket like AF_INET or AF_INET6.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Made the definition of in_addr all_routers conditional to remove
compiler warning:
warning: 'all_routers' defined but not used [-Wunused-const-variable=]
The warning occurs when igmpv3 is enabled.
Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
Add the possibility to flash stm32h747i_disco board using west
STM32CubeProgrammer runner, for both cores.
Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
If there's not enough networking buffers at certain moment,
they might become available later. So instead of closing connection
(and failing assertation) sleep and retry. This avoid the following
assertion failure when there's much of data to send:
net_pkt: Data buffer (1500) allocation failed.
net_tcp: conn: 0x20076024 packet allocation failed, len=1460
shell_telnet: Failed to send -105, shutting down
ASSERTION FAIL [err == 0] @ .../subsys/shell/shell_ops.c:416
os: r0/a1: 0x00000004 r1/a2: 0x000001a0 r2/a3: 0x00000004
os: r3/a4: 0x20044380 r12/ip: 0x00001958 r14/lr: 0x080c9027
os: xpsr: 0x41000000
os: Faulting instruction address (r15/pc): 0x0811ed26
os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
os: Current thread: 0x20045100 (shell_telnet)
os: Halting system
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
The HDA log backend has been buggy for some time, and the fixes are well
understood. The issue with HDA log as it is implemented today means
there are concurrency and ISR issues where it can deadlock.
The fixes are effectively dropping the usage of ipc to communicate
status, using polling on the hda stream, and having a formatter per call
context (cores + isr) when log mode immediate is enabled to fix log
mangling. However it was found this had a lot of unintentional side
effects that made it difficult to make progress on when it came to
changes of the host side python tooling.
Meanwhile the feature has sat unused for nearly a year. Remove it, and
it can always be revisited in the future if something like it happens to
be needed.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The write protect register (PWPR) found on RA Microcontrollers is an 8-bit
register at an odd address. It was being accessed using a pointer to a
uint32_t which causes a fault on some devices in the series.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Tested with zephyr example project "samples/basic/blinky" and "samples/
basic/button". These examples can run out-of-the-box. No modification
needed.
for "samples/basic/blinky", the red LED inside RGB LED on board will
blink every 2 seconds.
for "samples/basic/button", the red LED inside RGB LED on board will
turn on once BTN1 on board is pressed down. An log will be present in
uart console as well.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Add RGPIO gpio driver. This driver is used for i.MX93 and i.MX8ULP.
GPIO pinctrl, read/write and interrupt is supported. Runtime mmio
configuration is enabled, so no need for region definition in
mimx9/mmu_region.c
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
The wakeup-source is not used by the driver. Most probably this was
inadvertently left when copying the binding from pcf8523 driver.
Signed-off-by: Martin Jäger <martin@libre.solar>
Add new workflow steps to the babblesim workflow to run
also the UART tests on the nrf52_bsim.
This commit:
* Enables the single device tests (which we may
move to the normal twister workflow once we fix the
requirement for a fixture)
* Adds as a placeholder the infra for multidevice tests.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Do not run in CI all tests, as they have very similar configuration
and provide little extra coverage to justify the extra CI time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a tag to filter slow bsim tests in CI
(or tests which do not provide much extra coverage and
are not worth running all the time in CI)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test is quite heavy and long in simulation,
but its length is meant to find unlikely issues which
may be triggered only very rarely.
Let's provide a kconfig value to chose how long the
test is, and set it to a lower value when running in simulation
(in CI) to save time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Increase the busy wait time granularity while runing in simulation
for poll mode. In this mode, the driver spends a *lot* of time
waiting for the UART to be done. The smallest frame time is
~10µs @ 1Mbps, so busywaiting in very small increments
is very wastefull as we keep shuting down and turning on the simulated
MCU.
Let's increase the busy wait time increments of the driver to 3 micros,
which should not change much the behaviour.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Increase the UART speed to 1Mbps for the simulated nrf52
to reduce the amount of time spent busy waiting, and
therefore the real time duration of the test.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>