diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-06 09:53:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-06 09:53:07 +0000 |
commit | 00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23 (patch) | |
tree | 4f6800f72e8ef9efbf6c2c57214738eda773a1ae /src/templates/chcore.c | |
parent | d6d799ed48f8193bee286187132221f831726a07 (diff) | |
download | ChibiOS-00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23.tar.gz ChibiOS-00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23.tar.bz2 ChibiOS-00c6f5ea40f97385dce7ab7b9d20bc0cb909ad23.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@40 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/templates/chcore.c')
-rw-r--r-- | src/templates/chcore.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/templates/chcore.c b/src/templates/chcore.c index f39441ed5..bc8c68b90 100644 --- a/src/templates/chcore.c +++ b/src/templates/chcore.c @@ -33,14 +33,28 @@ /**
* This function implements the idle thread infinite loop. The function should
* put the processor in the lowest power mode capable to serve interrupts.
+ * The priority is internally set to the minimum system value so that this
+ * thread is executed only if there are no other ready threads in the system.
*/
-void chSysPause(void) {}
+void chSysPause(void) {
+
+ chThdSetPriority(IDLEPRIO);
+
+ while (TRUE)
+ ;
+}
/**
* Abonormal system termination handler. Invoked by the ChibiOS/RT when an
* abnormal unrecoverable condition is met.
*/
-void chSysHalt(void) {}
+void chSysHalt(void) {
+
+ chSysLock();
+
+ while (TRUE)
+ ;
+}
/**
* Context switch.
|