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 SPFATAL_TEST_CASE_EXTRA_TASKS 1 |
---|
28 | |
---|
29 | #define FATAL_ERROR_DESCRIPTION "Core fall out of a task" |
---|
30 | #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE |
---|
31 | #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE |
---|
32 | #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_THREAD_EXITTED |
---|
33 | |
---|
34 | rtems_task EmptyTask( |
---|
35 | rtems_task_argument unused |
---|
36 | ) |
---|
37 | { |
---|
38 | } |
---|
39 | |
---|
40 | void force_error() |
---|
41 | { |
---|
42 | rtems_id id; |
---|
43 | rtems_status_code status; |
---|
44 | |
---|
45 | status = rtems_task_create( |
---|
46 | rtems_build_name('T','A','0','1' ), |
---|
47 | 4, |
---|
48 | RTEMS_MINIMUM_STACK_SIZE, |
---|
49 | RTEMS_DEFAULT_MODES, |
---|
50 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
51 | &id |
---|
52 | ); |
---|
53 | directive_failed( status, "rtems_task_create" ); |
---|
54 | |
---|
55 | status = rtems_task_start( id, EmptyTask, 0 ); |
---|
56 | directive_failed( status, "rtems_task_start" ); |
---|
57 | |
---|
58 | status = rtems_task_wake_after( 10 ); |
---|
59 | directive_failed( status, "rtems_task_wake_after" ); |
---|
60 | |
---|
61 | /* we will not run this far */ |
---|
62 | } |
---|