Changeset c8a10609 in rtems
- Timestamp:
- 10/01/21 19:56:34 (2 years ago)
- Branches:
- 5
- Children:
- d5649e2
- Parents:
- 99698fb
- git-author:
- Joel Sherrill <joel@…> (10/01/21 19:56:34)
- git-committer:
- Joel Sherrill <joel@…> (10/07/21 15:31:38)
- Files:
-
- 7 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/Makefile.am
r99698fb rc8a10609 931 931 librtemscpu_a_SOURCES += score/src/schedulercbsunblock.c 932 932 librtemscpu_a_SOURCES += score/src/stackallocator.c 933 librtemscpu_a_SOURCES += score/src/stackallocatorforidle.c 933 934 librtemscpu_a_SOURCES += score/src/pheapallocate.c 934 935 librtemscpu_a_SOURCES += score/src/pheapextend.c -
cpukit/include/rtems/confdefs/percpu.h
r99698fb rc8a10609 134 134 const size_t _Thread_Idle_stack_size = CONFIGURE_IDLE_TASK_STACK_SIZE; 135 135 136 char _Thread_Idle_stacks[ 137 _CONFIGURE_MAXIMUM_PROCESSORS 138 * ( CONFIGURE_IDLE_TASK_STACK_SIZE + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE ) 139 ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT ) 140 RTEMS_SECTION( ".rtemsstack.idle" ); 136 /* 137 * If the user provides a custom idle stack allocator, then we do not need 138 * memory reserved for the stacks but the symbol is still referenced in 139 * threadcreateidle.c. The code path just never uses it. Make it minimal 140 * size to proceed. 141 */ 142 #ifndef CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE 143 char _Thread_Idle_stacks[ 144 _CONFIGURE_MAXIMUM_PROCESSORS 145 * ( CONFIGURE_IDLE_TASK_STACK_SIZE + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE ) 146 ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT ) 147 RTEMS_SECTION( ".rtemsstack.idle" ); 148 #endif 141 149 142 150 #if defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \ -
cpukit/include/rtems/confdefs/wkspace.h
r99698fb rc8a10609 133 133 #if defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ 134 134 && defined(CONFIGURE_TASK_STACK_DEALLOCATOR) 135 /* Custom allocator may or may not use the work space. */ 135 136 #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE 136 137 const bool _Stack_Allocator_avoids_workspace = true; … … 139 140 #endif 140 141 142 /* Custom allocator may or may not need initialization. */ 141 143 #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_INIT 142 144 const Stack_Allocator_initialize _Stack_Allocator_initialize = … … 146 148 #endif 147 149 150 /* Custom allocator must include allocate and free */ 148 151 const Stack_Allocator_allocate _Stack_Allocator_allocate = 149 152 CONFIGURE_TASK_STACK_ALLOCATOR; … … 151 154 const Stack_Allocator_free _Stack_Allocator_free = 152 155 CONFIGURE_TASK_STACK_DEALLOCATOR; 156 157 /* 158 * Must provide both a custom stack allocator and deallocator 159 */ 153 160 #elif defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ 154 161 || defined(CONFIGURE_TASK_STACK_DEALLOCATOR) 155 162 #error "CONFIGURE_TASK_STACK_ALLOCATOR and CONFIGURE_TASK_STACK_DEALLOCATOR must be both defined or both undefined" 163 #endif 164 165 /* 166 * Custom IDLE thread stacks allocator. If this is provided, it is assumed 167 * that the allocator is providing its own memory for these stacks. 168 */ 169 #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE 170 const Stack_Allocator_allocate_for_idle _Stack_Allocator_allocate_for_idle = 171 CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE; 156 172 #endif 157 173 -
cpukit/include/rtems/config.h
r99698fb rc8a10609 130 130 (_Stack_Allocator_free) 131 131 132 #define rtems_configuration_get_stack_allocate_for_idle_hook() \ 133 (_Stack_Allocator_allocate_for_idle) 134 132 135 /** 133 136 * This macro assists in accessing the field which indicates whether -
cpukit/include/rtems/score/stack.h
r99698fb rc8a10609 83 83 84 84 /** 85 * @brief Stack allocator allocate for idle handler. 86 * 87 * The allocate for idle handler is optional even when the user thread stack 88 * allocator and deallocator are configured. 89 * 90 * @param cpu Index of the CPU for the IDLE thread using this stack 91 * @param stack_size The size of the stack area to allocate in bytes. 92 * 93 * @retval NULL Not enough memory. 94 * @retval other Pointer to begin of stack area. 95 */ 96 typedef void *( *Stack_Allocator_allocate_for_idle )( 97 uint32_t cpu, 98 size_t stack_size 99 ); 100 101 /** 85 102 * @brief The minimum stack size. 86 103 * … … 125 142 126 143 /** @} */ 144 /** 145 * @brief The stack allocator allocate stack for idle thread handler. 146 * 147 * Application provided via <rtems/confdefs.h>. 148 */ 149 extern const Stack_Allocator_allocate_for_idle 150 _Stack_Allocator_allocate_for_idle; 127 151 128 152 #ifdef __cplusplus -
cpukit/score/src/threadcreateidle.c
r99698fb rc8a10609 54 54 config.stack_size = _Thread_Idle_stack_size 55 55 + CPU_IDLE_TASK_IS_FP * CONTEXT_FP_SIZE; 56 config.stack_area = &_Thread_Idle_stacks[ 57 _Per_CPU_Get_index( cpu ) * config.stack_size 58 ]; 56 57 /* 58 * The IDLE thread stacks may be statically allocated or there may be a 59 * custom allocator provided just as with user threads. 60 */ 61 config.stack_area = (*_Stack_Allocator_allocate_for_idle)( 62 _Per_CPU_Get_index( cpu ), 63 config.stack_size 64 ); 59 65 60 66 /* -
testsuites/sptests/Makefile.am
r99698fb rc8a10609 1784 1784 endif 1785 1785 1786 if TEST_spstkalloc03 1787 sp_tests += spstkalloc03 1788 sp_screens += spstkalloc03/spstkalloc03.scn 1789 sp_docs += spstkalloc03/spstkalloc03.doc 1790 spstkalloc03_SOURCES = spstkalloc03/init.c 1791 spstkalloc03_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spstkalloc03) \ 1792 $(support_includes) 1793 endif 1794 1795 if TEST_spstkalloc04 1796 sp_tests += spstkalloc04 1797 sp_screens += spstkalloc04/spstkalloc04.scn 1798 sp_docs += spstkalloc04/spstkalloc04.doc 1799 spstkalloc04_SOURCES = spstkalloc04/init.c 1800 spstkalloc04_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_spstkalloc04) \ 1801 $(support_includes) 1802 endif 1803 1786 1804 if TEST_spsysinit01 1787 1805 sp_tests += spsysinit01 -
testsuites/sptests/configure.ac
r99698fb rc8a10609 229 229 RTEMS_TEST_CHECK([spstkalloc]) 230 230 RTEMS_TEST_CHECK([spstkalloc02]) 231 RTEMS_TEST_CHECK([spstkalloc03]) 232 RTEMS_TEST_CHECK([spstkalloc04]) 231 233 RTEMS_TEST_CHECK([spsysinit01]) 232 234 RTEMS_TEST_CHECK([spsyslock01])
Note: See TracChangeset
for help on using the changeset viewer.