aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-13 17:20:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-13 17:20:39 +0000
commit85f17ebe017f0ef2a42d96eb3525346db5b9c65e (patch)
treed8bf0aaf3ff0fc37d9c78eab9206fb2bbd08a823 /os/kernel/src
parent16feb88c2dc82420390b56226e8fe7cbc49aeb3b (diff)
downloadChibiOS-85f17ebe017f0ef2a42d96eb3525346db5b9c65e.tar.gz
ChibiOS-85f17ebe017f0ef2a42d96eb3525346db5b9c65e.tar.bz2
ChibiOS-85f17ebe017f0ef2a42d96eb3525346db5b9c65e.zip
Customer CR.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2951 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src')
-rw-r--r--os/kernel/src/chsys.c4
-rw-r--r--os/kernel/src/chthreads.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c
index 29f4bdc7e..5d3c0bcf4 100644
--- a/os/kernel/src/chsys.c
+++ b/os/kernel/src/chsys.c
@@ -35,6 +35,7 @@
#include "ch.h"
+#if !CH_NO_IDLE_THREAD || defined(__DOXYGEN__)
/**
* @brief Idle thread working area.
* @see IDLE_THREAD_STACK_SIZE
@@ -59,6 +60,7 @@ void _idle_thread(void *p) {
IDLE_LOOP_HOOK();
}
}
+#endif /* CH_NO_IDLE_THREAD */
/**
* @brief ChibiOS/RT initialization.
@@ -93,11 +95,13 @@ void chSysInit(void) {
currp->p_state = THD_STATE_CURRENT;
chSysEnable();
+#if !CH_NO_IDLE_THREAD
/* This thread has the lowest priority in the system, its role is just to
serve interrupts in its context while keeping the lowest energy saving
mode compatible with the system status.*/
chThdCreateStatic(_idle_thread_wa, sizeof(_idle_thread_wa), IDLEPRIO,
(tfunc_t)_idle_thread, NULL);
+#endif
}
/**
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c
index 234cd6ae1..7df276bea 100644
--- a/os/kernel/src/chthreads.c
+++ b/os/kernel/src/chthreads.c
@@ -206,8 +206,7 @@ Thread *chThdCreateStatic(void *wsp, size_t size,
tprio_t chThdSetPriority(tprio_t newprio) {
tprio_t oldprio;
- chDbgCheck((newprio >= LOWPRIO) && (newprio <= HIGHPRIO),
- "chThdSetPriority");
+ chDbgCheck(newprio <= HIGHPRIO, "chThdSetPriority");
chSysLock();
#if CH_USE_MUTEXES