[riot-notifications] [RIOT-OS/RIOT] core/thread: mutex failure to block inside ISRs (#10488)

ZetaR60 notifications at github.com
Wed Nov 28 03:34:19 CET 2018


#### Description
On systems that use an interrupt to do a thread context switch ```mutex_lock(mutex)``` does not block as expected when inside an ISR and the mutex is already locked.

#### Steps to reproduce the issue
On a system such as ```esp8266```, issue an ```i2c_acquire(dev)``` or similar while inside of an ISR and while the same device is already acquired. I expect that this can be reproduced on other systems that use an interrupt to do a thread context switch.

#### Expected results
The system yields to another thread until the mutex is unblocked.

#### Actual results
The thread yield is put off until after the ISR completes, and the ISR's access collides with whatever is already using the bus.

#### Versions
Board was an ```esp8266-esp-12x```. Initial behavior found by @gschorcht in #10430, but I am following up on what is causing the issue.

#### References
#10430 Adds support for an I2C-based GPIO expander, and utilizing this device to generate a pin interrupt that alters the state of another expander pin causes some strange behavior. See @gschorcht  's explanation of the behavior [here](https://github.com/RIOT-OS/RIOT/pull/10430#issuecomment-441556234).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10488
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20181127/c131114c/attachment-0001.html>


More information about the notifications mailing list