From 66ff6722d223a1fee94c13f2704dda48acc63e8e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 6 Oct 2014 14:31:11 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7380 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) (limited to 'os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h') diff --git a/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h b/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h index 3151a8f39..6de5830dd 100644 --- a/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h +++ b/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h @@ -83,6 +83,13 @@ /* Module pre-compile time settings. */ /*===========================================================================*/ +/** + * @brief Number of pre-allocated static semaphores/mutexes. + */ +#if !defined(CMSIS_CFG_DEFAULT_STACK) +#define CMSIS_CFG_DEFAULT_STACK 256 +#endif + /** * @brief Number of pre-allocated static semaphores/mutexes. */ @@ -340,6 +347,8 @@ extern "C" { #endif osStatus osKernelInitialize(void); osStatus osKernelStart(void); + osThreadId osThreadCreate (osThreadDef_t *thread_def, void *argument); + osStatus osThreadTerminate (osThreadId thread_id); osStatus osThreadSetPriority(osThreadId thread_id, osPriority newprio); /*osEvent osWait(uint32_t millisec);*/ osTimerId osTimerCreate (const osTimerDef_t *timer_def, @@ -384,19 +393,6 @@ static inline uint32_t osKernelSysTick(void) { return (uint32_t)chVTGetSystemTimeX(); } -/** - * @brief Creates a thread. - */ -static inline osThreadId osThreadCreate (osThreadDef_t *thread_def, - void *argument) { - - return (osThreadId)chThdCreateFromHeap(0, - THD_WORKING_AREA_SIZE(thread_def->stacksize), - NORMALPRIO+thread_def->tpriority, - (tfunc_t)thread_def->pthread, - argument); -} - /** * @brief Returns the current thread. */ @@ -405,18 +401,6 @@ static inline osThreadId osThreadGetId(void) { return (osThreadId)chThdGetSelfX(); } -/** - * @brief Thread termination. - * @note The thread is not really terminated but asked to terminate which - * is not compliant. - */ -static inline osStatus osThreadTerminate(osThreadId thread_id) { - - chThdTerminate(thread_id); - - return osOK; -} - /** * @brief Thread time slice yield. */ -- cgit v1.2.3