Another round of repeated words cleanup. This commit tries to keep the
diff minimal and line wrapping was mostly left intact in the touched
files, as having them consistent across the documentation is probably
the topic of a future tree-wide cleanup (or not)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix SYS_MEM_BLOCKS_DEFINE_STATIC() description.
Use a "memory blocks allocator" instead of "slab",
which is most probably was copy-pasted from
the previous "slab" chapter by mistake.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a paragraph mentioning the initlevels target for inspecting the
DEVICE_DEFINE and SYS_INIT sequence.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Replaces sizeof(header) which is equal to the size of the pointer,
by sizeof (*header), which is equal to the size of struct message_header.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Fixed a few occurrences of incorrect references to Kconfig options
(missing the CONFIG_ prefix)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Attempting to run the memory slab docs snippets will
result in build issues. This PR is an attempt to fix
those.
Signed-off-by: Andrei Hutanu <andrei.hutanu.i@gmail.com>
Fixed an incorrect mention of buffer size being expressed in 32-byte
words for data item mode when it's in fact 32-bit.
Fixed a few broken references to C functions and structs.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The macro K_THREAD_STACK_MEMBER has actually been deprecated
since v2.4.0 in the macro doxygen description, but it was
never marked with __DEPRECATED_MACRO. Since this was being
used in various drivers, make it follow the deprecation
process.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Two references to the integration of object cores with threads were
missing from the documentation. This fixes that.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Zephyr's code base uses MP_MAX_NUM_CPUS to
know how many cores exists in the target. It is
also expected that both symbols MP_MAX_NUM_CPUS
and MP_NUM_CPUS have the same value, so lets
just use MP_MAX_NUM_CPUS and simplify it.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Alignment of the message queue's ring buffer is not necessary.
The underlying implementation uses memcpy (which is
alignment-agnostic) and does not expose any internal pointers
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
This commit follows the parent commit work.
This commit introduces the following major changes.
1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
to the 'include/zephyr/arch/arm' directory.
2. Change the path string which is influenced by the changement 1.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.
The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);
has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);
The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.
All in-tree uses of the function have been adapted.
Fixes#61888.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some architectures such as RISC-v support more than 255 interrupts
per aggrigator. This diff adds the ability to forgo the aggrigator
pattern and use a configurable number of bits for multilevel
interruts.
Signed-off-by: Joshua Lilly <jgl@meta.com>
This is meant as a substitute for sys_clock_timeout_end_calc()
Current sys_clock_timeout_end_calc() usage opens up many bug
possibilities due to the actual timeout evaluation's open-coded nature.
Issue ##50611 is one example.
- Some users store the returned value in a signed variable, others in
an unsigned one, making the comparison with UINT64_MAX (corresponding
to K_FOREVER) wrong in the signed case.
- Some users compute the difference and store that in a signed variable
to compare against 0 which still doesn't work with K_FOREVER. And when
this difference is used as a timeout argument then the K_FOREVER
nature of the timeout is lost.
- Some users complexify their code by special-casing K_NO_WAIT and
K_FOREVER inline which is bad for both code readability and binary
size.
Let's introduce a better abstraction to deal with absolute timepoints
with an opaque type to be used with a well-defined API.
The word "timeout" was avoided in the naming on purpose as the timeout
namespace is quite crowded already and it is preferable to make a
distinction between relative time periods (timeouts) and absolute time
values (timepoints).
A few stacks are also adjusted as they were too tight on X86.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Scheduling relative timeouts from within timer callbacks (=sys clock ISR
context) differs from scheduling relative timeouts from an application
context.
This change documents and explains the rationale of this distinction.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
cooperative priorities are negative, 0 is not a cooperative priority.
Looks like the docs are showing an outdated diagram for some reason, try
to update that with a refresh.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Updates the data passing summary table to indicate that the size of
a message queue data item must be a multiple of its data alignment.
This brings the documentation in both the summary table and the
message queue documentation into alignment.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Since not all syscalls are generated to be included in
the final binaries due to changes in build steps and CMake
files, update the document to clarify what needs to be
done to include specific syscalls in final binaries.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Updates the FIFO and LIFO documentation to clarify behavior
surrounding re-adding data items to queues.
Fixes#56336
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Signed-off-by: Keith Packard <keithp@keithp.com>
The typedef defines an interrupt config routine with `const struct device
*dev`, while the example function had (void) as argument. This could be
considered confusing / would throw compiler warnings even though the
parameter isn't strictly necessary.
Code examples for initializing an IRQ in a device example follow the
updated pattern (e.g. see `drivers/serial/uart_npcx.c`).
Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
Augment the doc with functionality added in commit a211970b42 ("riscv:
improve contended FPU switching").
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
FPU context switching is always performed on demand through the FPU
access exception handler. Actual task switching only grants or denies
FPU access depending on the current FPU owner.
Because RISC-V doesn't have a dedicated FPU access exception, we must
catch the Illegal Instruction exception and look for actual FP opcodes.
There is no longer a need to allocate FPU storage on the stack for every
exception making esf smaller and stack overflows less likely.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Update usage of zephyr_code_relocate to new API, and add examples of
relocating a library target, as well as using multiple files in list or
CMake generator expressions.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Inclusion of this file is now deprecated in favor of
find_package(Zephyr ...). Update documentation appropriately.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Use z_user_to_copy() instead of directly writing to the user provided
pointer to validate that the user has write permission to underlying
memory location.
It is important to verify the memory not only for reads, but also for
writes, as otherwise the function can be abused by usermode code to
write to privileged read/write, unprivileged read-only memory partition.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>