aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/ARMCMx
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-21 10:45:42 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-21 10:45:42 +0000
commit8f89ec3c0bb6f4bc5a77afd37ebb3919181f7a4d (patch)
tree73e66c07f6c99ba3d914e1319e7d873ebaa78fbf /os/common/ports/ARMCMx
parentadcc51666865020347d364f7b3cad8a622124f7a (diff)
downloadChibiOS-8f89ec3c0bb6f4bc5a77afd37ebb3919181f7a4d.tar.gz
ChibiOS-8f89ec3c0bb6f4bc5a77afd37ebb3919181f7a4d.tar.bz2
ChibiOS-8f89ec3c0bb6f4bc5a77afd37ebb3919181f7a4d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8919 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/ports/ARMCMx')
-rw-r--r--os/common/ports/ARMCMx/cmsis_os/cmsis_os.c1
-rw-r--r--os/common/ports/ARMCMx/cmsis_os/cmsis_os.h14
2 files changed, 9 insertions, 6 deletions
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