_PTHREAD_CANCEL_POS is an implementation detail and should not
be defined in the global scope. Furthermore, _PTHREAD_CANCEL_POS
uses a reserved identifier (underscore followed by capital
letter).
Adjust definitions so that the implementation detail is only
used in the implementation and not in the interface.
Additionally, modify naming so that the non-standard macro does
not use a reserved identifier.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Ensure that the "headers" test checks that the following constants
are defined:
* PTHREAD_PROCESS_SHARED
* PTHREAD_PROCESS_PRIVATE
* PTHREAD_COND_INITIALIZER
* PTHREAD_MUTEX_INITIALIZER
* PTHREAD_CANCELED
They were already defined by previous commits, but the test had not
been updated.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
These calls were added some time ago, so ensure they are checked
for existence.
* pthread_condattr_getclock()
* pthread_condattr_setclock()
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The simple header test was not updated to verify that the
following functions were implemented even though they were
implemented some time ago.
* pthread_spin_destroy()
* pthread_spin_init()
* pthread_spin_lock()
* pthread_spin_trylock()
* pthread_spin_unlock()
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
* "identity" functions grouped more closely
* posix_thread_pool_init() should be adjacent to the SYS_INIT()
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Previously, `pthread_key_delete()` was only ever deleting key 0
rather than the key corresponding to the provided argument.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The Nanopb cmake locates the protoc executable, verify the result
instead of doing it ourselves.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
In the case where a transaction is spilt due to the rx buff len
being longer than the tx or the transaction buffer exceeding the
size of the requested buffer with non gpio CS, the chip select
would be de-asserted/asserted in the middle of the transaction.
Fixes: #57577
Signed-off-by: Dean Sellers <dsellers@evos.com.au>
When building using GCC version < 11.0.0, TOOLCHAIN_CLANG_VERSION is not
yet defined in gcc.h. Nevertheless, it's still needed due to reuse of
gcc.h in llvm.h.
Guard access to TOOLCHAIN_CLANG_VERSION to fix that.
Signed-off-by: Igor Druzhinin <igord@xilinx.com>
The correct printf format specifier for size_t is %zu. Without this
change the sample generates warnings like this:
warning: format '%u' expects argument of type 'unsigned int', but
argument 2 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The original SHI module only has one output FIFO buffer. It costs a lot
when the driver has to send/change the protocol control code because it
must fill out all 128 bytes of output FIFO. In npcx4, we introduce
another output buffer in 1-byte depth. These two buffers can switch back
and forth during the transaction. We can use the single-byte buffer
to send the control code and the 128-byte FIFO to send the data payload.
It helps improve the SHI driver's efficiency.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Implement the pm_policy lock to prevent the chip enters the deep slepp
mode while shi transaction is ongoing.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
The shi module in npcx4 supports the enhanced buffer mode.
Add a new compatible string "nuvoton,npcx-shi-enhanced" for it.
Then the shi driver can determine if it should use the enhanced buffer
mode based on the compatiable string.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Changes of call state were not notified. Fixed by calling notify_calls
in respective functions.
Signed-off-by: Lukas Streitenberger <lukas.streitenberger@wsa.com>
This fixes a bug with the action's Docker container apparently not being
able to run Node correctly anymore...
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add `__unused` to the `$Attribute` family along with its
`__maybe_unused`, `__always_unused` & `__used` brothers, so
that:
```c
__unused int ret;
```
is recognized as variable declaration, and doesn't raise
`LINE_SPACING` warning in CI.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Follow-up: #64704
Introducing 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: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Since sending of public key was moved into system
work (https://github.com/zephyrproject-rtos/zephyr/pull/62331)
it uses the same context as a Host Tx buffer
allocator for gatt sending. Host cannot wait for
free buffer anymore. Mesh requires 4 buffers
to send max size frame(public key) during
provisioning.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
There are duplicated names specified in per-board YAML files.
This change will allow distinguishing boards in software that
presents the pretty names and not the raw names of boards.
Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
Add Renode simulation support for `hifive_unmatched`, the
script is basically copied over from `hifive_unleashed`, with
very minor edits.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
When CONFIG_IEEE802154_RAW_MODE is set there is no network interface
that could provide pointer to the device the interface is running on top
of. The current implementation of nRF5 ieee802154 driver implicitly
assumes that such an interface is always present, which leads to crashes
when raw mode is enabled.
This commit adds support for IEEE802154_RAW_MODE in nRF5 ieee802154
driver by latching pointer to the ieee802154 device on initialization if
needed so that it doesn't have to be retrieved using the network
interface in run-time.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Since lsm6dsv16x may be multi-instantiated, triggers must be enabled
and configured on DT basis and not only thru CONFIG_LSM6DSV16X_TRIGGER
macro; if either int1-gpios of int2-gpios (or both) are configured
in DT, the flag trig_enable is set to 'true' for that instance.
The previous implentation was lacking the check of those two Device
Tree properties, so trig_enabled was always true for all instances.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Introduced `CONFIG_PLIC_SHELL` to enable the build of shell
debugging command to get the hit count of each interrupt
controller's IRQ line. This is especially useful when working
with dynamically installed ISRs, which will be the case for
`plic_sw`.
Example usage:
```
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits
==================
10 177
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits
==================
10 236
uart:~$ plic stats clear interrupt-controller@c000000
Cleared stats of interrupt-controller@c000000.
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits
==================
10 90
```
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Maxim Adelman <imax@meta.com>
if-conditionals should have brackets according to Zephyr's
coding standard, and explicitly compares `edge_irq` against 0.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Logging shall not use character pointers with %p because in
certain configurations it may lead to memory faults. A compile
time detection is added. If faulty usage is detected then
message is replaced with error message which indicates which
message failed and what shall be done (casting to a pointer
of different type).
Validation is enabled only for configurations which remove
strings from binary as otherwise it may impact CI execution
time.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add tests for Z_CBPRINTF_NONE_CHAR_PTR_COUNT, Z_CBPRINTF_P_COUNT
and Z_CBPRINTF_POINTERS_VALIDATE.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When cbprintf package is created statically then only argument
types are taken into account and not the format string. It means that a
character pointer is always interpreted as %s and not %p. When %s is
found then string from rw location is copied into the package.
Copying unexpected data may lead to memory faults so it must
be avoided. User shall cast an argument to a pointer of a different
type.
Patch adds macros which can at compile time determine if %p is
used with char *. Result cannot be passed to static assert because
compiler sees it as non-constant (even though calculated at compile
time) but a runtime logging error message can be added instead of
original message.
Z_CBPRINTF_NONE_CHAR_PTR_COUNT counts number of none character
pointers in the arguments list.
Z_CBPRINTF_P_COUNT counts number of %p occurrences in the format
string. If results of both macros are equal it means that string
is ok.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Enable the pdflscape package (available in the Latex distros recommended
for Zephyr) to allow for some pages to be rendered in landscape mode.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The WS2812 LED strip driver does not use a scratch byte, therefore
free up a byte per pixel which was unused except in the GPIO-based
driver whereby it is used
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Enable a condition as define dma_callback function only if
any one instance of ns16550 has dmas parameter in dts.
This resolves conflict of dma_callback function defined but
not used warning in case of UART_ASYNC_API enabled but dmas
parameter is not provided to any ns16550 UARTs dts instances.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Removed if (IS_ENABLED()) and used #if as they are causing CI failures
and removed LPSS related functions which are not under LPSS config.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
This test needs to include zephyr/kernel/mm/demand_paging.h, not
zephyr/kernel/mm.h, due to its use of k_mem_pin().
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
By making short inputs optional, the user can bypass short-events all
together if necessary (e.g. custom button-press listener).
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
Reference counting was broken when adding the enable delay.
Now reverted to previous pattern.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Add Nuvoton guys, TomChang19 and alvsun, in collaborators of Nuvoton
NPCX Platforms and remove MulinChao and ChiHuaL since they are already
the maintainers.
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Extend Twister command line with --pytest-args. This parameter
is passed to pytest subprocess. It allows to select a specific
testcase from a test suite.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>