diff options
Diffstat (limited to 'src/chsys.c')
-rw-r--r-- | src/chsys.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/chsys.c b/src/chsys.c index 613e7bfeb..f57180dd7 100644 --- a/src/chsys.c +++ b/src/chsys.c @@ -18,7 +18,7 @@ */ /** - * @addtogroup Initialization + * @addtogroup System * @{ */ @@ -82,7 +82,9 @@ void chSysTimerHandlerI(void) { * @note The use of system mutual exclusion zone is not recommended in * the user code, it is a better idea to use the semaphores or mutexes * instead. - * @see CH_USE_NESTED_LOCKS + * @note The code of this API is may be inlined or not depending on the + * @p CH_OPTIMIZE_SPEED setting. + * @see CH_USE_NESTED_LOCKS, chSysLockInline() */ void chSysLock(void) { @@ -94,7 +96,9 @@ void chSysLock(void) { * @note The use of system mutual exclusion zone is not recommended in * the user code, it is a better idea to use the semaphores or mutexes * instead. - * @see CH_USE_NESTED_LOCKS + * @note The code of this API is may be inlined or not depending on the + * @p CH_OPTIMIZE_SPEED setting. + * @see CH_USE_NESTED_LOCKS, chSysUnlockInline() */ void chSysUnlock(void) { @@ -103,4 +107,14 @@ void chSysUnlock(void) { } #endif /* !CH_OPTIMIZE_SPEED */ +/** + * Abonormal system termination handler. Invoked by the ChibiOS/RT when an + * abnormal unrecoverable condition is met. + */ +void chSysHalt(void) { + + chSysDisable(); + sys_halt(); +} + /** @} */ |