theCore
theCore copied to clipboard
The Bus: set_buffers() hit assert during async xfer handling afer unlock()
Following call order leads to assertion hit:
-
lock()- bus is locked -
xfer(callback)- async xfer scheduled -
unlock()- schedule unlocking - Interrupt occur,
callbackis called - New buffers tried to be set with
set_buffers()call - assert hits in
ecl_assert(m_state & bus_locked);
See: https://github.com/forGGe/theCore/blob/master/dev/bus/export/dev/bus.hpp#L321
One of possible solution is to reject is as expected, since unlocked bus must support very limited functionality, e.g. setting buffers shouldn't be allowed outsize of interrupt.
Not enough cases to analyze. Postponed.