Closed kjbracey closed 6 years ago
Sure - I just put that comment in to try to justify the BlockExecuter
/ScopedLock
mismatch.
Not sure what's misleading though. BlockExecuter is more flexible, but has the complexity of actually creating the Callback
objects, which I think are complex enough that the compilers will fail to optimise them out. Or am I underestimating the optimisers?
A ScopedLock
template instantiation can definitely be simple enough that at least at -O2
level it just compiles straight to the relevant function calls with no overhead.
Edited, and squashed your cosmetic change in.
Avoid static ROM + RAM use when driver is not referenced.
Saves about 150 bytes of ROM and 50 bytes of RAM in mbed OS easy-connect when using a different driver.
Switches mutex locking from built-in BlockExecuter to the ScopedMutexLock from mbed OS.