From 8f89ec3c0bb6f4bc5a77afd37ebb3919181f7a4d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 21 Feb 2016 10:45:42 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8919 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/ports/ARMCMx/cmsis_os/cmsis_os.c | 1 + os/common/ports/ARMCMx/cmsis_os/cmsis_os.h | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'os/common/ports/ARMCMx') diff --git a/os/common/ports/ARMCMx/cmsis_os/cmsis_os.c b/os/common/ports/ARMCMx/cmsis_os/cmsis_os.c index 6b328ea7f..04bebeb1d 100644 --- a/os/common/ports/ARMCMx/cmsis_os/cmsis_os.c +++ b/os/common/ports/ARMCMx/cmsis_os/cmsis_os.c @@ -119,6 +119,7 @@ osThreadId osThreadCreate(const osThreadDef_t *thread_def, void *argument) { thread_def->stacksize; return (osThreadId)chThdCreateFromHeap(0, THD_WORKING_AREA_SIZE(size), + thread_def->name, NORMALPRIO+thread_def->tpriority, (tfunc_t)thread_def->pthread, argument); diff --git a/os/common/ports/ARMCMx/cmsis_os/cmsis_os.h b/os/common/ports/ARMCMx/cmsis_os/cmsis_os.h index 41d96baed..1c0998baf 100644 --- a/os/common/ports/ARMCMx/cmsis_os/cmsis_os.h +++ b/os/common/ports/ARMCMx/cmsis_os/cmsis_os.h @@ -243,6 +243,7 @@ typedef struct os_thread_def { os_pthread pthread; osPriority tpriority; uint32_t stacksize; + const char *name; } osThreadDef_t; /** @@ -301,14 +302,15 @@ typedef struct os_messageQ_def { * @brief Create a Thread definition. */ #if defined(osObjectsExternal) -#define osThreadDef(name, priority, instances, stacksz) \ - extern const osThreadDef_t os_thread_def_##name +#define osThreadDef(thd, priority, stacksz, name) \ + extern const osThreadDef_t os_thread_def_##thd #else -#define osThreadDef(name, priority, stacksz) \ -const osThreadDef_t os_thread_def_##name = { \ - (name), \ +#define osThreadDef(thd, priority, stacksz, name) \ +const osThreadDef_t os_thread_def_##thd = { \ + (thd), \ (priority), \ - (stacksz) \ + (stacksz), \ + (name) \ } #endif -- cgit v1.2.3