Changeset 84e960e in rtems


Ignore:
Timestamp:
Sep 7, 2016, 12:25:30 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
11323b7
Parents:
8bb9d41
git-author:
Sebastian Huber <sebastian.huber@…> (09/07/16 12:25:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/08/16 05:43:02)
Message:

stackchk: Fix stack checker thread initialization

Commit 0fd6f25507fbea5f4892b71b58837cdda17856b4 relaxed the thread begin
extension execution environment. This broke the stack check which only
partially initialized the stack pattern in its create extension. Move
the part of the begin extension to the create extension.

Location:
cpukit/libmisc/stackchk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/stackchk/check.c

    r8bb9d41 r84e960e  
    203203{
    204204  Stack_check_Initialize();
    205 
    206   if (the_thread)
    207     Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
    208 
    209   return true;
    210 }
    211 
    212 /*
    213  *  rtems_stack_checker_Begin_extension
    214  */
    215 void rtems_stack_checker_begin_extension(
    216   Thread_Control *the_thread
    217 )
    218 {
    219   if ( the_thread->Object.id == 0 )        /* skip system tasks */
    220     return;
     205  Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
    221206
    222207  memcpy(
     
    225210    PATTERN_SIZE_BYTES
    226211  );
     212
     213  return true;
    227214}
    228215
  • cpukit/libmisc/stackchk/stackchk.h

    r8bb9d41 r84e960e  
    9898
    9999/**
    100  * @brief Stack Checker Task Begin Extension
    101  *
    102  * This method is the task begin extension for the stack checker.
    103  *
    104  * @param[in] the_thread points to task starting to execute
    105  *
    106  * @note This is called from the internal method _Thread_Handler.
    107  */
    108 void rtems_stack_checker_begin_extension(
    109   Thread_Control *the_thread
    110 );
    111 
    112 /**
    113100 * @brief Stack Checker Task Context Switch Extension
    114101 *
     
    139126  0,                                           /* rtems_task_delete  */ \
    140127  rtems_stack_checker_switch_extension,        /* task_switch  */ \
    141   rtems_stack_checker_begin_extension,         /* task_begin   */ \
     128  0,                                           /* task_begin   */ \
    142129  0,                                           /* task_exitted */ \
    143130  0 /* rtems_stack_checker_fatal_extension */, /* fatal        */ \
Note: See TracChangeset for help on using the changeset viewer.