Skip to content

cpu/esp32: fix of thread priorities levels#12753

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/fix_sched_prio
Nov 21, 2019
Merged

cpu/esp32: fix of thread priorities levels#12753
aabadie merged 1 commit intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/fix_sched_prio

Conversation

@gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Nov 20, 2019

Contribution description

If the WiFi interface is enabled with module esp_wifi or esp_now, a number of high priority threads are created to handle the WiFi hardware events. In this case, the number of thread priority levels has to be 32. However, a number of tests insist that the number of thread priority levels is 16.

This PR introduces the conditional setting of SCHED_PRIO_LEVELS to satisfy number of tests:

tests/cond_order
tests/mutex_order
tests/rmutex_cpp
tests/rmutex
tests/posix_semaphore
tests/shell
tests/xtimer_mutex_lock_timeout

This PR belongs to the series of PRs, each with very small changes that fix automatic tests on ESP32 boards.

Testing procedure

Make, flash and execute one of the tests mentioned above, for example,

make BOARD=esp32-wroom-32 -C tests/cond_order flash test

Issues/PRs references

Requires #12752

@gschorcht gschorcht added Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Nov 20, 2019
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that the mentioned tests are failing on master (except xtimer_mutex...) and are fixed by this PR.

Please address the minor change requests and this PR is good to go. You can squash directly.

A number of tests insist that the number of thread priority levels is 16. However, when using the WiFi interface, a number of high priority threads are required to handle the WiFi hardware. In this case, the number of thread priority levels must be 32. Solves the problem of tests `tests/shell`.
@gschorcht gschorcht force-pushed the cpu/esp32/fix_sched_prio branch from 0f2acdf to 7b1ef78 Compare November 21, 2019 05:55
@gschorcht
Copy link
Contributor Author

@aabadie Many thanks for the quick review. I'm really surprised how fast the process can be 😄

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK and go!

@aabadie aabadie merged commit 6cdf656 into RIOT-OS:master Nov 21, 2019
@aabadie
Copy link
Contributor

aabadie commented Nov 21, 2019

I'm really surprised how fast the process can be

From my experience, this is the combination of several factors:

  • low latency of both the contributor and maintainers
  • small, well documented and focused PR
  • luck: it appears that I brought an ESP32 board with me so I could also test your PRs :)

@gschorcht
Copy link
Contributor Author

@aabadie Thanks again for reviewing, testing and merging. BTW, I have now a nucleo-f411re board on my desk and hope that I can support you with STM32 testing.

@gschorcht gschorcht deleted the cpu/esp32/fix_sched_prio branch November 21, 2019 09:23
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants