Changeset 5180762c in rtems


Ignore:
Timestamp:
Feb 14, 2020, 12:36:30 PM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
ba7b2df7
Parents:
c70d112
git-author:
Sebastian Huber <sebastian.huber@…> (02/14/20 12:36:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/25/20 06:15:19)
Message:

config: Add _Thread_Idle_body

Move the idle thread body configuration constant out of the
configuration table.

Provide a default definition of the idle thread body constant.

Update #3875.

Location:
cpukit
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    rc70d112 r5180762c  
    957957librtemscpu_a_SOURCES += score/src/threadhandler.c
    958958librtemscpu_a_SOURCES += score/src/threadinitialize.c
     959librtemscpu_a_SOURCES += score/src/threadidledefault.c
    959960librtemscpu_a_SOURCES += score/src/threadloadenv.c
    960961librtemscpu_a_SOURCES += score/src/threadrestart.c
  • cpukit/include/rtems/confdefs.h

    rc70d112 r5180762c  
    10931093  #if defined(BSP_IDLE_TASK_BODY)
    10941094    #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
    1095   #else
    1096     #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
    1097   #endif
     1095  #endif
     1096#endif
     1097
     1098#if defined(CONFIGURE_INIT) && defined(CONFIGURE_IDLE_TASK_BODY)
     1099const Thread_Idle_body _Thread_Idle_body = CONFIGURE_IDLE_TASK_BODY;
    10981100#endif
    10991101/**@}*/ /* end of IDLE thread configuration */
     
    26372639  const rtems_configuration_table Configuration = {
    26382640    CONFIGURE_EXECUTIVE_RAM_SIZE,             /* required RTEMS workspace */
    2639     CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
    26402641    #ifdef CONFIGURE_UNIFIED_WORK_AREAS       /* true for unified work areas */
    26412642      true,
  • cpukit/include/rtems/config.h

    rc70d112 r5180762c  
    8888  uintptr_t                      work_space_size;
    8989
    90   /**
    91    * This element points to the BSP's optional idle task which may override
    92    * the default one provided with RTEMS.
    93    */
    94   void                        *(*idle_task)( uintptr_t );
    95 
    9690  /**
    9791   * @brief Specifies if a unified work area is used or not.
     
    156150
    157151#define rtems_configuration_get_idle_task() \
    158         (Configuration.idle_task)
     152        (_Thread_Idle_entry)
    159153
    160154#define rtems_configuration_get_idle_task_stack_size() \
  • cpukit/include/rtems/score/threadidledata.h

    rc70d112 r5180762c  
    5757extern const size_t _Thread_Idle_stack_size;
    5858
     59/**
     60 * @brief The idle thread body type.
     61 */
     62typedef void *( *Thread_Idle_body )( uintptr_t );
     63
     64/**
     65 * @brief The idle thread body.
     66 *
     67 * This constant is defined by the application configuration via
     68 * <rtems/confdefs.h>.
     69 */
     70extern const Thread_Idle_body _Thread_Idle_body;
     71
    5972/** @} */
    6073
  • cpukit/score/src/threadcreateidle.c

    rc70d112 r5180762c  
    2626#include <rtems/score/sysstate.h>
    2727#include <rtems/score/userextimpl.h>
    28 #include <rtems/config.h>
    2928
    3029#include <string.h>
     
    8079  idle->is_idle = true;
    8180  idle->Start.Entry.adaptor = _Thread_Entry_adaptor_idle;
    82   idle->Start.Entry.Kinds.Idle.entry = rtems_configuration_get_idle_task();
     81  idle->Start.Entry.Kinds.Idle.entry = _Thread_Idle_body;
    8382
    8483  _Thread_Load_environment( idle );
Note: See TracChangeset for help on using the changeset viewer.