1 | /* |
---|
2 | * Classic API Init task create failure |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2008. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | /* |
---|
13 | * Way too much stack space. Should generate a fatal error |
---|
14 | * on the init task create. |
---|
15 | */ |
---|
16 | #define CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
17 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
18 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
19 | { rtems_build_name('I', 'N', 'I', ' '), |
---|
20 | RTEMS_MINIMUM_STACK_SIZE, |
---|
21 | 1, |
---|
22 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
23 | Init, |
---|
24 | RTEMS_DEFAULT_MODES, |
---|
25 | 0 |
---|
26 | } |
---|
27 | }; |
---|
28 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
29 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
30 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
31 | |
---|
32 | #define FATAL_ERROR_TEST_NAME "6" |
---|
33 | #define FATAL_ERROR_DESCRIPTION \ |
---|
34 | "Core initialize with invalid stack hook" |
---|
35 | #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE |
---|
36 | #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE |
---|
37 | #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_BAD_STACK_HOOK |
---|
38 | |
---|
39 | void *New_stack_allocate_hook(size_t unused); |
---|
40 | |
---|
41 | void *New_stack_allocate_hook(size_t unused) |
---|
42 | { |
---|
43 | return NULL; |
---|
44 | } |
---|
45 | |
---|
46 | void force_error() |
---|
47 | { |
---|
48 | if (Configuration.stack_free_hook != NULL) |
---|
49 | Configuration.stack_allocate_hook = NULL; |
---|
50 | else |
---|
51 | Configuration.stack_allocate_hook = New_stack_allocate_hook; |
---|
52 | |
---|
53 | rtems_initialize_data_structures(); |
---|
54 | /* we will not run this far */ |
---|
55 | } |
---|
56 | |
---|