-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: some tests don't work with newlib
lock functions.
#12732
Comments
The question is, how we should deal with it. It is more a general problem. |
newlib
lock functions.newlib
lock functions.
@kaspar030 For the moment, I could find a hack which solves the problem with the RIOT/cpu/esp_common/syscalls.c Lines 374 to 379 in d71b98c
It also solves the problem that RIOT/cpu/esp_common/syscalls.c Line 182 in d71b98c
I'm not really happy with this hack since it breaks the thread safety for file I/O operations on Do you think, this hack is an acceptable way or do we need a more general solution? |
Description
The following test applications call
puts
inside an ISR which can lead to problems whennewlib
's locking functions are implemented by the platform:tests/isr_yield_higher
tests/periph_rtc
Background
newlib
's reentrant versions of system calls use lock functions for different lock objects. For example,puts
locks thestdout
file using_lock_acquire_recursive
. While the lock functions in single-thread environments are only dummies, these functions would have to be implemented by the operating system in multi-thread environments.The only reasonable way in RIOT to realize these lock functions
seems to be RIOT's built-in mechanism
mutex
andrmutex
. Sincemutex
andrmutex
don't work in interrupt context, system calls must not be used in ISRs.The problem was found out in PR #11108.
Steps to reproduce
Enable locking functions in
cpu/esp8266/syscalls.c
in PR #11108 and flashtests/isr_yield_higher
The text was updated successfully, but these errors were encountered: