ChibiOS 21: RT API change

This commit is contained in:
rusefillc 2023-07-06 13:42:01 -04:00
parent f0873ec7e5
commit b6d2bdbd09
3 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ void chDbgPanic3(const char *msg, const char * file, int line) {
dbg_panic_file = file;
dbg_panic_line = line;
#if CH_DBG_SYSTEM_STATE_CHECK
ch.dbg.panic_msg = msg;
ch0.dbg.panic_msg = msg;
#endif /* CH_DBG_SYSTEM_STATE_CHECK */
#if !EFI_PROD_CODE

View File

@ -464,7 +464,7 @@ EXTERNC int getRemainingStack(thread_t *otp) {
otp->activeStack = r13;
int remainingStack;
if (ch.dbg.isr_cnt > 0) {
if (ch0.dbg.isr_cnt > 0) {
// ISR context
remainingStack = (int)(r13 - 1) - (int)&__main_stack_base__;
} else {

View File

@ -18,8 +18,8 @@
* Unfortunately ChibiOS has two versions of methods for different
* contexts.
*/
#define isLocked() (ch.dbg.lock_cnt > 0)
#define isIsrContext() (ch.dbg.isr_cnt > 0)
#define isLocked() (ch0.dbg.lock_cnt > 0)
#define isIsrContext() (ch0.dbg.isr_cnt > 0)
#define assertIsrContext(code) efiAssertVoid(code, isIsrContext(), "NOT_ISR")