Add and use THREAD_DEFAULT_MAXIMUM_NAME_SIZE

This commit is contained in:
Sebastian Huber
2019-07-30 06:24:00 +02:00
parent 5a678de90c
commit 5ee70c5487
4 changed files with 12 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ void bsp_fatal_extension(
executing = _Thread_Get_executing();
if ( executing != NULL ) {
char name[ 32 ];
char name[ 2 * THREAD_DEFAULT_MAXIMUM_NAME_SIZE ];
_Thread_Get_name( executing, name, sizeof( name ) );
printk(

View File

@@ -2637,7 +2637,7 @@ struct _reent *__getreent(void)
)
#ifndef CONFIGURE_MAXIMUM_THREAD_NAME_SIZE
#define CONFIGURE_MAXIMUM_THREAD_NAME_SIZE 16
#define CONFIGURE_MAXIMUM_THREAD_NAME_SIZE THREAD_DEFAULT_MAXIMUM_NAME_SIZE
#endif
#ifdef CONFIGURE_INIT

View File

@@ -939,6 +939,15 @@ extern const size_t _Thread_Control_add_on_count;
*/
extern const size_t _Thread_Initial_thread_count;
/**
* @brief The default maximum size of a thread name in characters (including
* the terminating '\0' character).
*
* This is the default value for the application configuration option
* CONFIGURE_MAXIMUM_THREAD_NAME_SIZE.
*/
#define THREAD_DEFAULT_MAXIMUM_NAME_SIZE 16
/**
* @brief Maximum size of a thread name in characters (including the
* terminating '\0' character).

View File

@@ -250,7 +250,7 @@ static void Stack_check_report_blown_task(
{
const Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
char name[2 * THREAD_DEFAULT_MAXIMUM_NAME_SIZE];
printk("BLOWN STACK!!!\n");
printk("task control block: 0x%08" PRIxPTR "\n", (intptr_t) running);