Closed bremoran closed 8 years ago
@rgrover @hugovincent @bogdanm @autopulated @0xc0170
Comments?
The nRF5x platform needs a soft-device specific critical section API; __disable_irq() is not an option. I believe critical section and atomic-ops may need to be target-specific.
@rgrover Is that problem duplicated on any other platforms? It might be more appropriate to add a linker override to the nRF5x platform, rather than making all atomic ops target-specific. On most platforms, they will be generic operations.
currently only the nRF5x requires platform-dependent atomics; but the same would be true for the forthcoming POSIX platform. Perhaps @hugovincent can share some thoughts. I believe we shouldn't base critical-section on disabling interrupts.
Should we introduce a platform_enter_critical(&state) [https://github.com/ARMmbed/mbed-6lowpan-eventloop-adaptor/blob/master/source/events.cpp#L32] to handle platform specific implementations?
@rgrover, that seems to be the way to go, yes.
Is this PR still relevant?
It is, but I'd say not for our feature freeze. We can deal with it later.
We should check for a race between __get_PRIMASK
and __disable_irq
I believe this one can be closed, resolved in #88
Implements the API discussed in https://github.com/ARMmbed/mbed-util/issues/16