From bbabbf4ac29fc00d38a767cf07db01cf642e937d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 5 Jan 2009 14:05:30 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@582 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chsys.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/chsys.c') 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(); +} + /** @} */ -- cgit v1.2.3