Context
XWOS Context
Categories:
less than a minute
Overview
Context is critical for RTOS‑based development. Developers must clearly understand the context in which a function is invoked, to avoid anomalous issues caused by improper API usage.
In general, sleep‑capable APIs can only be called from thread context, and must not be invoked from other contexts.
A common characteristic of all sleep‑inducing APIs in XWOS is the presence of the parameter to, which specifies the wake‑up time point.
XWOS Execution Contexts
表格
| Context | Spinlock | Seqlock | Sleep | Mutex |
|---|---|---|---|---|
Boot (BOOT) |
Unusable | Unusable | Unusable | Unusable |
Thread (THD) |
Usable | Usable | Usable | Usable |
Power Management (PWRMNT) |
Usable | Usable | Unusable | Unusable |
ISR Top‑Half (ISR) |
Usable | Usable | Unusable | Unusable |
ISR Bottom‑Half (BH) |
Usable | Usable | Unusable | Unusable |
Idle Task (IDLE) |
Usable | Usable | Unusable | Unusable |