Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: zephyrproject-rtos/zephyr-lang-rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: zephyrproject-rtos/zephyr-lang-rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: critical
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 9, 2025

  1. zephyr-sys: Export irq_lock/unlock

    These are macros in Zephyr, so write explicit wrappers for them, that
    bindgen will be able to directly use.
    
    Signed-off-by: David Brown <[email protected]>
    d3zd3z committed Apr 9, 2025
    Configuration menu
    Copy the full SHA
    f02e274 View commit details
    Browse the repository at this point in the history
  2. zephyr: Replace critical-section implementation

    There is a fairly fundamental incompatibility between Zephyr spin locks
    and the Critical Section specification.  Zephyr spin locks do not allow
    nesting from within a single spin lock.  The critical section API only
    has an `acquire` and `release` entry, and provides no way (such as a
    stack frame) to have a unique context for different invocation places.
    
    Unfortunately, this means we cannot use spin locks for critical
    sections.
    
    Instead, this change implements critical sections using irq locking.
    The implementation of these macros on Zephyr does try to make them SMP
    safe, with a simple atomic lock, but there is still something preventing
    the riscv SMP from working.
    
    Also, these entries cannot be called from user mode.  There are various
    other reasons we don't support usermode, so at this time, just have a
    compile time assertion that usermode is not enabled in the build.  If it
    is needed, we will have to come up with another way to implement this.
    
    Signed-off-by: David Brown <[email protected]>
    d3zd3z committed Apr 9, 2025
    Configuration menu
    Copy the full SHA
    a4df841 View commit details
    Browse the repository at this point in the history
Loading