From 85f17ebe017f0ef2a42d96eb3525346db5b9c65e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 13 May 2011 17:20:39 +0000 Subject: Customer CR. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2951 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chsys.c | 4 ++++ os/kernel/src/chthreads.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'os/kernel/src') 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 -- cgit v1.2.3