The original slab documentation was written with only 32-bit platforms
in mind. Since then support for 64-bit platforms have been added, but
the documented minimum values for alignment (and block sizes too) had
not been updated. This makes it clear that the minimum alignment
required for 32-bit platforms is 4 bytes, and 8 bytes for 64-bit
platforms.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add information about the introduced cleanup classes, with usage examples.
An explicit warning is added that toolchain support is required.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Drop a note about prefixing device specific api naming with the full
normalized compatible for the device. Nothing in tree adopted this and
it would be unnecessarily verbose, the standard "keep the coding style
coherent" works just fine for this.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add documentation for the runtime system timer frequency
update mechanism introduced by
CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE.
Update the Hardware Cycles section to clarify that:
- The system timer frequency is typically fixed but can be runtime-variable
on some platforms
- sys_clock_hw_cycles_per_sec() returns a runtime value when runtime
frequency updates are enabled
- Application code must not assume a single immutable frequency when
runtime updates are enabled
Add a new "Runtime System Timer Frequency" section documenting:
- The typical fixed-frequency behavior on most platforms
- Use cases for runtime frequency (hardware discovery or dynamic changes)
- Requirements for platforms that change frequency at runtime:
- Enable CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE
- Call z_sys_clock_hw_cycles_per_sec_update() after clock changes
- Optionally override z_sys_clock_hw_cycles_per_sec_update() if the
timer driver needs to update cached state or reprogram hardware
- Limitation: not compatible with per-CPU frequency scaling
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
There is no need to include the k_mutex priority inheritance code
when CONFIG_PRIORITY_CEILING is set to a priority level that is at
or below that of the idle thread.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Update the kernel timer docs to specify the differences between the
duration and period of a timer, and specifying that the period of
a periodic timer can be shorter or longer than the specified period,
and that it does not drift relative to the system timer.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Correct the description in the "What Cannot be Expected to Work" section
to state that the listed functionality fails when CONFIG_MULTITHREADING
is **disabled**, as the previous wording implied the opposite.
Fixeszephyrproject-rtos/zephyr#101718
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Updates the time slicing image in the associated documentation to ...
1. Show the resetting of a time slice after scheduling a new thread
2. Indicate that it is specific for UP scheduler
It also adds a note to the documentation describing how the ordering
of the threads would change with the SMP scheduler.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fixes documents where blocks where indented to the right of their parent
causing them to render as definition lists.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Adds a note to the meta-IRQ thread documentation indicating that
that when a cooperative thread resumes after being preempted by
a meta-IRQ thread it will resume on the same CPU from which it was
preempted.
On a UP system such behavior is a given. However, this behavior becomes
relevant on an SMP system to ensure that both schedule-locked and
cooperative threads are not accidentally shuffled to another CPU while
querying the properties associated with their current CPU.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Similar to logging and shell, allow application to override and
extend the ASSERT macros globally. This enables intercepting log strings
at the macro level for things like string tokenizations.
Signed-off-by: Kevin Zeng <zengk@google.com>
Sphinx has a built-in `:rfc:` role for referencing RFC documents.
This commit updates documentation pages referencing RFCs to use this role.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Remove the note about time_t being 64-bit in Zephyr, since that is
generally not accurate and depends on the configuration of the C library.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Apply `:file:` markup to file names in the "Files generated by the script"
section under "Implementation Details" to improve clarity and readability.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The k_pipe_get and k_pipe_put APIs have been retired in Zephyr 4.2, this
commit removes references to these APIs in the documentation that was
missed in the original rework of thhe k_pipe API.
Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
This is variation of the PR to handle phantom events and hopefully
this get merged into the PR to land.
See-also: https://github.com/zephyrproject-rtos/zephyr/pull/89624
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Minor cosmetic update so that the notes in the "Data Passing" summary
table are actual interactive footnotes.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit introduces the new test ram_context_for_isr that shows
how to configure an application (prj.conf, CMakeLists.txt, etc.) in
order to enable full ISR execution with a RAM context.
It resolves the issue of flash latency affecting real-time constraints
during ISR execution.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This commit introduces the SRAM_SW_ISR_TABLE option which is selected by
DYNAMIC_INTERRUPT. It allows splitting the DYNAMIC_INTERRUPT option into
two parts:
- One for the relocation of the ISR vector table in RAM
- One for the inclusion of functions needed to install ISRs dynamically
The goal is to later only select the relocation of the ISR vector table in
RAM and not all the associated functions from the dynamic interrupt
mechanism.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Commit a0b746 deleted 2 deprecated driver init levels (EARLY,
APPLICATION), but didn't update the number mentioned in the doc.
Signed-off-by: Nabil Elqatib <nabilelqatib@gmail.com>
The `zephyr_code_relocate` now supports the NOINIT memory type in addition
to DATA, TEXT and BSS. This patch documents its usage.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This patch improves the formatting of the "Additional Configurations"
section of the "Code And Data Relocation" document.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Includes explanation of the min-heap’s properties, constraints and
explains about the uses cases of min-heap. It also contains references
to Sample Application and min-heap API
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
The documentation did not state clearly that any zero-latency IRQ must
also be declared as a direct ISR. This is critical because failure to do
so may cause race conditions between the ZLI and regular ISRs when
executing the preable/postamble code in regular interrupts.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add documentation in the timeutil group for recently added functions
for validating, comparing, and manipulating `struct timespec`
objects as well as functions for converting between representation
of time durations as either `struct timespec` or `k_timeout_t`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Updates the scheduling documentation to include references to the
time slicing Kconfig options to make them easier to notice.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit fixes a type in kernel/driver/index.rst,
present in the "Drivers that do not use Zephyr Device
Model" subsection
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
- Fixes Direct ISR code example.
- Deletes the wrong comment,
which was likely copy-pasted from
the previous ISR code example.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
A long time ago, Zephyr had two macros that could be used for build-time
assertions: BUILD_ASSERT() and BUILD_ASSERT_MSG(). The latter has been
dropped in v2.7 and removed from the documentation; however, the intro
paragraph of the "Build Assertions" section has never been updated to
reflect this, and still confusingly claims that "Zephyr provides two
macros for performing build-time assertions" when only BUILD_ASSERT()
remains.
Update the introductory paragraph of "Build Assertions" section such that
it makes sense now that only one build-time assertion macro exists.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Some projects may have needs for more than 99 priority levels, so add
a third linker input section for each obj level.
Signed-off-by: Josh DeWitt <josh.dewitt@garmin.com>
Improve naming of the scheduler and call it what it is: simple. Using
'dumb' for the default scheduler algorithm in Zephyr is a bad idea.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Updates the direct ISR documentation to make it more clear that
direct ISR handlers should be declared using ISR_DIRECT_DECLARE().
Fixes#85683
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Enhance the description around reschedule points to provide more
context about the current thread's identity. This update clarifies
that changing the identity of the current thread involves switching
the CPU's execution from one thread to another.
Signed-off-by: Arrel Neumiller <rlneumiller@gmail.com>
doc: Improve context for thread identity in scheduling
Enhance the description around reschedule points to provide more
context about the current thread's identity. This update clarifies
that changing the identity of the current thread involves switching
the CPU's execution from one thread to another.
Signed-off-by: Arrel Neumiller <rlneumiller@gmail.com>
Clarify that the idle thread has priority CONFIG_NUM_PREEMPT_PRIORITIES,
not (CONFIG_NUM_PREEMPT_PRIORITIES - 1).
The idle thread priority ranges from 0 to 127 and never has a cooperative
thread priority.
Signed-off-by: Jonas Spinner <jonas.spinner@burkert.com>
One might want to select the symbols to be relocated inside a file or
a library. To do this, one can use the FILTER argument of
zephyr_code_relocate which must contain a regular expression of the
section names to be selected for relocation.
The test_function_in_sram2 test case in
`tests/application_development/code_relocation` has been updated to
verify that only one function `function_in_sram()` is relocated to ram
and that the function `function_not_relocated()` is not being relocated
when using relocation filter.
Signed-off-by: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
If there are pending readers, it is best to perform a single data copy
directly into their final destination buffer rather than doing one copy
into the ring buffer just to immediately copy the same data out of it.
Incidentally, this allows for supporting pipes with no ring buffer at all.
The pipe implementation being deprecated has a similar capability so better
have it here too.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>