54 #include <rtems/sysinit.h> 57 #include <rtems/test.h> 71 #define NAME rtems_build_name('N', 'A', 'M', 'E') 73 static void fatal_extension(
75 bool always_set_to_false,
81 T_step_false(1, always_set_to_false,
"always_set_to_false");
82 T_step_eq_ulong(2, error, 123);
94 T_case_begin(
"SpaceProfileFatalError", NULL);
99 #define INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES 101 #define MAX_TLS_SIZE RTEMS_ALIGN_UP(64, RTEMS_TASK_STORAGE_ALIGNMENT) 110 static char buffer[512];
112 static void check_task_context(T_event event,
const char *name)
115 T_check_task_context(event, name);
119 static const T_action actions[] = {
120 T_report_hash_sha256,
122 T_check_rtems_barriers,
123 T_check_rtems_extensions,
124 T_check_rtems_message_queues,
125 T_check_rtems_partitions,
126 T_check_rtems_periods,
127 T_check_rtems_semaphores,
132 static const T_config test_config = {
133 .name =
"SpaceProfile",
135 .buf_size =
sizeof(buffer),
137 .verbosity = T_VERBOSE,
139 .action_count = T_ARRAY_SIZE(actions),
145 .initial_priority = 1,
146 .storage_area = init_task_storage,
147 .storage_size =
sizeof(init_task_storage),
148 .maximum_thread_local_storage_size = MAX_TLS_SIZE,
150 .attributes = INIT_TASK_ATTRIBUTES
153 static void init_task(
void)
158 T_run_initialize(&test_config);
159 T_case_begin(
"SpaceProfileTaskBuild", NULL);
163 T_step_rsc_success(0, sc);
166 T_step_rsc_success(1, sc);
168 T_check_rtems_tasks(T_EVENT_RUN_INITIALIZE_EARLY, T_case_name());
174 RTEMS_SYSINIT_CLASSIC_USER_TASKS,
175 RTEMS_SYSINIT_ORDER_MIDDLE
178 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER 180 #define CONFIGURE_MAXIMUM_PROCESSORS 4 182 #define CONFIGURE_MAXIMUM_BARRIERS 1 184 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 186 #define CONFIGURE_MAXIMUM_PARTITIONS 1 188 #define CONFIGURE_MAXIMUM_PERIODS 1 190 #define CONFIGURE_MAXIMUM_SEMAPHORES 1 192 #define CONFIGURE_MAXIMUM_TASKS 1 194 #define CONFIGURE_MAXIMUM_TIMERS 1 196 #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1 198 #define CONFIGURE_MESSAGE_BUFFER_MEMORY 1 200 #define CONFIGURE_MICROSECONDS_PER_TICK 10000 202 #define CONFIGURE_SCHEDULER_NAME NAME 204 #define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension } 208 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0 210 #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY 212 #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM 214 #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION 216 #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body 218 #define CONFIGURE_INIT static RTEMS_NO_RETURN void rtems_fatal(rtems_fatal_source fatal_source, rtems_fatal_code error_code)
%
static __inline__ bool _System_state_Is_up(System_state_Codes state)
Checks if the state is up.
Evaluate Configuration Options.
rtems_name name
This member defines the name of the task.
This structure defines the configuration of a task constructed by rtems_task_construct().
rtems_status_code rtems_task_start(rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument)
%
CPU_Uint32ptr rtems_task_argument
This type is used to represent task argument values.
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler in a declaration or definition to enforce the specified alignment.
#define RTEMS_MINIMUM_STACK_SIZE
%
This header file defines the RTEMS Classic API.
Interface to Kernel Print Methods.
void rtems_put_char(int c, void *arg)
Puts the character via rtems_putc().
static __inline__ System_state_Codes _System_state_Get(void)
Gets the current system state.
Internal_errors_t rtems_fatal_code
%
#define RTEMS_TASK_STORAGE_SIZE(_size, _attributes)
Returns the recommended task storage area size for the specified size and task attributes.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
#define RTEMS_DEFAULT_MODES
This task mode constant represents the default mode set.
System State Handler API.
Fatal source for application specific errors.
rtems_status_code rtems_task_construct(const rtems_task_config *config, rtems_id *id)
Constructs a task from the specified the task configuration.
#define RTEMS_TASK_STORAGE_ALIGNMENT
This constant defines the recommended alignment of a task storage area in bytes.