uVisor doesn't set the PSP of the target thread. The RTOS sets the PSP
of the target thread from the target thread's TCB. However, when
interrupts of higher priority than PendSV happen between the call to
uVisor to switch boxes, and the RTOS setting PSP, the uVisor vIRQ
interrupt handler will attempt to use an invalid PSP (the PSP from
before the box and thread switch). This leads to a crash. Make box and
thread switching atomic by disabling interrupts immediately before the
box switching until immediately after the new PSP is set.
OsEventObserver objects expect a context to be maintained per thread on
their behalf. Add this context to the thread control block and extend
the thread creation functions with the ability to supply a context.
Add the OsEventObserver mechanism. A client interested in receiving
notifications on certain OS events can register to receive notifications
with osRegisterForOsEvents. This is useful for clients like the secure
memory allocator, which observes thread switching events in order to
swap in and out different memory allocator objects.
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.
To help generic code, an interface of an event queue at the PAL level has been
added. Implementation can either rely on the event mechanism internal to the
stack or use the SimpleEventQueue implementation provided by this patch.
This interface expose the primitives needed to realize operations defined in
the GAP layer. Data types, event and function definitions follow closely HCI
commands and events defined in the Bluetooth specification.
Ensure both the stack and stack size used in the Thread class are
aligned to 8 bytes. This prevents the runtime error
"Thread 0 error -11: Unknown" due to incorrect stack alignment.
This class and its components are not used by BLE API and never been used in the
last two years.
This patch deprecate all the components in GapEvent.h and exclude its definitions
from the documentation process.
Updated NanostackRfPhyEfr32 with a receive queue.
Cleaned up debug messages, re-added to non-threaded calls.
Removed debug print override
Removed tr_debug override
Removed normal-operation prints that could have timing implications if enabled
Removed dead NVIC code (and a couple of dead log outputs)
2ab150c Removed toolchain specific warnings
0825d34 Adopted alternative implementation for lfs_ctz_index
46e22b2 Adopted lfs_ctz_index implementation using popcount
4fdca15 Slight name change with ctz skip-list functions
git-subtree-dir: littlefs
git-subtree-split: 2ab150cc500d5b8233ec8ef6109efa363bf1d38c