From 43aa123e65ac76ee1abe0e63a459610c1f687664 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 25 Sep 2016 06:37:59 +0000 Subject: Improved chSysHalt(). git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9795 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/src/ch.c | 1 + os/rt/src/chsys.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'os') 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) { } -- cgit v1.2.3