aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-10 14:56:02 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-10 14:56:02 +0000
commitea60d55415892ca1a98c735d95c310637b835bf3 (patch)
tree115e04acb0ff10b1e67c244c7441ba8940bbba1a /src
parent078651da50beaf9058569513eb6b6d7ea88df02e (diff)
downloadChibiOS-ea60d55415892ca1a98c735d95c310637b835bf3.tar.gz
ChibiOS-ea60d55415892ca1a98c735d95c310637b835bf3.tar.bz2
ChibiOS-ea60d55415892ca1a98c735d95c310637b835bf3.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@606 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/chsys.c10
-rw-r--r--src/include/sys.h19
2 files changed, 16 insertions, 13 deletions
diff --git a/src/chsys.c b/src/chsys.c
index 21fbe1048..347b75da3 100644
--- a/src/chsys.c
+++ b/src/chsys.c
@@ -94,16 +94,6 @@ void chSysTimerHandlerI(void) {
chVTDoTickI();
}
-/**
- * Abonormal system termination handler. Invoked by the ChibiOS/RT when an
- * abnormal unrecoverable condition is met.
- */
-void chSysHalt(void) {
-
- chSysDisable();
- sys_halt();
-}
-
#if !defined(CH_OPTIMIZE_SPEED)
/**
* Enters the ChibiOS/RT system mutual exclusion zone.
diff --git a/src/include/sys.h b/src/include/sys.h
index 6c6b65704..cf7cf78a4 100644
--- a/src/include/sys.h
+++ b/src/include/sys.h
@@ -32,6 +32,12 @@
#define chSysPuts(msg) sys_puts(msg)
/**
+ * Abonormal system termination handler. Invoked by the ChibiOS/RT when an
+ * abnormal unrecoverable condition is met.
+ */
+#define chSysHalt() sys_halt()
+
+/**
* Performs a context switch.
* This is the most critical code in any port, this function is responsible
* for the context switch between 2 threads.
@@ -52,8 +58,8 @@
#define chSysEnable() sys_enable()
/**
- * Raises the system interrupt priority mask to system level.
- * @note The implementation is architecture dependent, it may just enable the
+ * Raises the system interrupt priority mask to system level.
+ * @note The implementation is architecture dependent, it may just disable the
* interrupts.
* @note This API should only be invoked from the main thread in order to stop
* ChibiOS/RT, hardware de/re-initialization should follow. It would then
@@ -63,6 +69,14 @@
#define chSysDisable() sys_disable()
/**
+ * Raises the system interrupt priority mask to the maximum level thus disabling
+ * any mask-able interrupt source..
+ * @note The implementation is architecture dependent, it may just disable the
+ * interrupts or be exactly equivalent to @p chSysDisable().
+ */
+#define chSysDisableAll() sys_disable_all()
+
+/**
* Enters the ChibiOS/RT system mutual exclusion zone from within an interrupt
* handler.
* @note This API may do nothing on some architectures, it is required because
@@ -161,7 +175,6 @@ extern "C" {
#endif
void chSysInit(void);
void chSysTimerHandlerI(void);
- void chSysHalt(void);
#if !defined(CH_OPTIMIZE_SPEED)
void chSysLock(void);
void chSysUnlock(void);