[riot-commits] [RIOT-OS/RIOT] 87b49d: cpu/native: defer yield when IRQs are disabled.

Kaspar Schleiser noreply at github.com
Wed Aug 25 21:59:30 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 87b49d04ab3bb04d40839e9d60a1d37783d6f83e
      https://github.com/RIOT-OS/RIOT/commit/87b49d04ab3bb04d40839e9d60a1d37783d6f83e
  Author: Kaspar Schleiser <kaspar at schleiser.de>
  Date:   2021-08-24 (Tue, 24 Aug 2021)

  Changed paths:
    M cpu/native/irq_cpu.c
    M cpu/native/native_cpu.c

  Log Message:
  -----------
  cpu/native: defer yield when IRQs are disabled.

This makes native behave like Cortex-M, which flags PENDSV, which then
gets triggered once IRQs are re-enabled.


  Commit: fe1d9981a8b391faff6b7cc3a7c27dae8e946e13
      https://github.com/RIOT-OS/RIOT/commit/fe1d9981a8b391faff6b7cc3a7c27dae8e946e13
  Author: Kaspar Schleiser <kaspar at schleiser.de>
  Date:   2021-08-24 (Tue, 24 Aug 2021)

  Changed paths:
    A tests/deferred_yield_higher/Makefile
    A tests/deferred_yield_higher/Makefile.ci
    A tests/deferred_yield_higher/README.md
    A tests/deferred_yield_higher/main.c
    A tests/deferred_yield_higher/tests/test.py

  Log Message:
  -----------
  tests/deferred_yield_higher: initial commit

This test verifies that a thread can call `thread_yield_higher()` with IRQs
disabled, and that the actual context switch is deferred until IRQs are
re-enabled.


  Commit: da140c251af699436372d0a50eb5d39e0cc0ff37
      https://github.com/RIOT-OS/RIOT/commit/da140c251af699436372d0a50eb5d39e0cc0ff37
  Author: Kaspar Schleiser <kaspar at schleiser.de>
  Date:   2021-08-25 (Wed, 25 Aug 2021)

  Changed paths:
    M cpu/native/irq_cpu.c
    M cpu/native/native_cpu.c
    A tests/deferred_yield_higher/Makefile
    A tests/deferred_yield_higher/Makefile.ci
    A tests/deferred_yield_higher/README.md
    A tests/deferred_yield_higher/main.c
    A tests/deferred_yield_higher/tests/test.py

  Log Message:
  -----------
  Merge pull request #16754 from kaspar030/native_deferred_yield_higher

cpu/native: fix thread_yield_higher() with IRQs disabled


Compare: https://github.com/RIOT-OS/RIOT/compare/dde4772aa4f3...da140c251af6


More information about the commits mailing list