diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/nil/src/ch.c | 1 | ||||
-rw-r--r-- | os/rt/src/chsys.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/os/nil/src/ch.c b/os/nil/src/ch.c index 2a57b5401..562259913 100644 --- a/os/nil/src/ch.c +++ b/os/nil/src/ch.c @@ -298,6 +298,7 @@ void chSysHalt(const char *reason) { (void)reason;
#endif
+ /* Halt hook code, usually empty.*/
CH_CFG_SYSTEM_HALT_HOOK(reason);
/* Harmless infinite loop.*/
diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c index 1d3c7eff6..715c97d74 100644 --- a/os/rt/src/chsys.c +++ b/os/rt/src/chsys.c @@ -193,15 +193,15 @@ void chSysHalt(const char *reason) { port_disable();
- /* Halt hook code, usually empty.*/
- CH_CFG_SYSTEM_HALT_HOOK(reason);
-
/* Logging the event.*/
_trace_halt(reason);
/* Pointing to the passed message.*/
ch.dbg.panic_msg = reason;
+ /* Halt hook code, usually empty.*/
+ CH_CFG_SYSTEM_HALT_HOOK(reason);
+
/* Harmless infinite loop.*/
while (true) {
}
|