1 | /* |
---|
2 | * Classic API Init task create failure |
---|
3 | * |
---|
4 | * $Id$ |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Way too much stack space. Should generate a fatal error |
---|
9 | * on the init task create. |
---|
10 | */ |
---|
11 | #define CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
12 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
13 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
14 | { rtems_build_name('I', 'N', 'I', ' '), |
---|
15 | RTEMS_MINIMUM_STACK_SIZE, |
---|
16 | 1, |
---|
17 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
18 | Init, |
---|
19 | RTEMS_DEFAULT_MODES, |
---|
20 | 0 |
---|
21 | } |
---|
22 | }; |
---|
23 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
24 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
25 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
26 | |
---|
27 | #define FATAL_ERROR_DESCRIPTION "Core initialize with invalid stack hook" |
---|
28 | #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE |
---|
29 | #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE |
---|
30 | #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_BAD_STACK_HOOK |
---|
31 | |
---|
32 | void *New_stack_allocate_hook( uint32_t unused) |
---|
33 | { |
---|
34 | } |
---|
35 | |
---|
36 | void force_error() |
---|
37 | { |
---|
38 | rtems_configuration_table New_Configuration; |
---|
39 | |
---|
40 | New_Configuration = *_Configuration_Table; |
---|
41 | |
---|
42 | if (_Configuration_Table->stack_free_hook != NULL) |
---|
43 | New_Configuration.stack_allocate_hook = NULL; |
---|
44 | else |
---|
45 | New_Configuration.stack_allocate_hook = &New_stack_allocate_hook; |
---|
46 | |
---|
47 | rtems_initialize_data_structures( &New_Configuration ); |
---|
48 | /* we will not run this far */ |
---|
49 | } |
---|
50 | |
---|