From fef1911a8f6329ad97e4112965e004d21bffef73 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 20 Aug 2010 07:15:55 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2134 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/include/chsys.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'os/kernel/include/chsys.h') diff --git a/os/kernel/include/chsys.h b/os/kernel/include/chsys.h index 5759d0cca..ae013d7c7 100644 --- a/os/kernel/include/chsys.h +++ b/os/kernel/include/chsys.h @@ -28,6 +28,16 @@ #ifndef _CHSYS_H_ #define _CHSYS_H_ +/** + * @brief Returns a pointer to the idle thread. + * @note The reference counter of the idle thread is not incremented but + * it is not strictly required being the idle thread a static + * object. + * + * @return Pointer to the idle thread, + */ +#define chSysGetIdleThread() ((Thread *)_idle_thread_wa) + /** * @brief Halts the system. * @details This function is invoked by the operating system when an @@ -168,9 +178,12 @@ */ #define CH_FAST_IRQ_HANDLER(id) PORT_FAST_IRQ_HANDLER(id) +extern WORKING_AREA(_idle_thread_wa, IDLE_THREAD_STACK_SIZE); + #ifdef __cplusplus extern "C" { #endif + void _idle_thread(void *p); void chSysInit(void); void chSysTimerHandlerI(void); #if CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED -- cgit v1.2.3