diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-10-03 19:35:13 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-10-03 19:35:13 +0000 |
commit | 6d1ecacaf4a001fea2af72ec3682ace59f45adb8 (patch) | |
tree | 5e088896f59c55debb18b5c9c1bda3b2a2e32030 /os/kernel | |
parent | c17f03701a8d102888ce06752c3b53fc9bd2ddac (diff) | |
download | ChibiOS-6d1ecacaf4a001fea2af72ec3682ace59f45adb8.tar.gz ChibiOS-6d1ecacaf4a001fea2af72ec3682ace59f45adb8.tar.bz2 ChibiOS-6d1ecacaf4a001fea2af72ec3682ace59f45adb8.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4733 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r-- | os/kernel/include/chregistry.h | 6 | ||||
-rw-r--r-- | os/kernel/src/chregistry.c | 6 | ||||
-rw-r--r-- | os/kernel/src/chsys.c | 7 |
3 files changed, 10 insertions, 9 deletions
diff --git a/os/kernel/include/chregistry.h b/os/kernel/include/chregistry.h index 0669dc43f..a39d37841 100644 --- a/os/kernel/include/chregistry.h +++ b/os/kernel/include/chregistry.h @@ -35,9 +35,9 @@ * @brief ChibiOS/RT memory signature record.
*/
typedef struct {
- char ch_identifier[4]; /**< @brief Always set to "CHRT". */
+ char ch_identifier[4]; /**< @brief Always set to "main". */
+ uint8_t ch_zero; /**< @brief Must be zero. */
uint8_t ch_size; /**< @brief Size of this structure. */
- uint8_t ch_reserved5; /**< @brief Reserved field. */
uint16_t ch_version; /**< @brief Encoded ChibiOS/RT version. */
uint8_t ch_ptrsize; /**< @brief Size of a pointer. */
uint8_t ch_timesize; /**< @brief Size of a @p systime_t. */
@@ -116,7 +116,7 @@ typedef struct { #ifdef __cplusplus
extern "C" {
#endif
- extern volatile ROMCONST chdebug_t ch_debug;
+ extern ROMCONST chdebug_t ch_debug;
Thread *chRegFirstThread(void);
Thread *chRegNextThread(Thread *tp);
#ifdef __cplusplus
diff --git a/os/kernel/src/chregistry.c b/os/kernel/src/chregistry.c index 976e3a51a..8b9f40f85 100644 --- a/os/kernel/src/chregistry.c +++ b/os/kernel/src/chregistry.c @@ -56,10 +56,10 @@ /*
* OS signature in ROM plus debug-related information.
*/
-volatile ROMCONST chdebug_t ch_debug = {
- "CHRT",
- (uint8_t)sizeof (chdebug_t),
+ROMCONST chdebug_t ch_debug = {
+ "main",
(uint8_t)0,
+ (uint8_t)sizeof (chdebug_t),
(uint16_t)((CH_KERNEL_MAJOR << 11) |
(CH_KERNEL_MINOR << 6) |
(CH_KERNEL_PATCH) << 0),
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index 10987f56d..1946a8263 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -83,9 +83,6 @@ void chSysInit(void) { port_init();
_scheduler_init();
_vt_init();
-#if CH_USE_REGISTRY
- (void)&ch_debug;
-#endif
#if CH_USE_MEMCORE
_core_init();
#endif
@@ -106,7 +103,11 @@ void chSysInit(void) { #endif
chSysEnable();
+#if CH_USE_REGISTRY
+ chRegSetThreadName((const char *)&ch_debug);
+#else
chRegSetThreadName("main");
+#endif
#if !CH_NO_IDLE_THREAD
/* This thread has the lowest priority in the system, its role is just to
|