1 | /* |
---|
2 | * Classic API Init task create failure |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2009. |
---|
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 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | /* |
---|
15 | * Way too much stack space. Should generate a fatal error |
---|
16 | * on the init task create. |
---|
17 | */ |
---|
18 | #define CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
19 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
20 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
21 | { rtems_build_name('I', 'N', 'I', ' '), |
---|
22 | RTEMS_MINIMUM_STACK_SIZE, |
---|
23 | 1, |
---|
24 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
25 | Init, |
---|
26 | RTEMS_DEFAULT_MODES, |
---|
27 | 0 |
---|
28 | } |
---|
29 | }; |
---|
30 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
31 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
32 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
33 | |
---|
34 | #define SPFATAL_TEST_CASE_EXTRA_TASKS 1 |
---|
35 | |
---|
36 | #define FATAL_ERROR_TEST_NAME "5" |
---|
37 | #define FATAL_ERROR_DESCRIPTION "Core fall out of a task" |
---|
38 | #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE |
---|
39 | #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE |
---|
40 | #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_THREAD_EXITTED |
---|
41 | |
---|
42 | rtems_task EmptyTask( rtems_task_argument unused ); |
---|
43 | |
---|
44 | rtems_task EmptyTask( |
---|
45 | rtems_task_argument unused |
---|
46 | ) |
---|
47 | { |
---|
48 | } |
---|
49 | |
---|
50 | void force_error() |
---|
51 | { |
---|
52 | rtems_id id; |
---|
53 | rtems_status_code status; |
---|
54 | |
---|
55 | status = rtems_task_create( |
---|
56 | rtems_build_name('T','A','0','1' ), |
---|
57 | 4, |
---|
58 | RTEMS_MINIMUM_STACK_SIZE, |
---|
59 | RTEMS_DEFAULT_MODES, |
---|
60 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
61 | &id |
---|
62 | ); |
---|
63 | directive_failed( status, "rtems_task_create" ); |
---|
64 | |
---|
65 | status = rtems_task_start( id, EmptyTask, 0 ); |
---|
66 | directive_failed( status, "rtems_task_start" ); |
---|
67 | |
---|
68 | status = rtems_task_wake_after( 100 ); |
---|
69 | directive_failed( status, "rtems_task_wake_after" ); |
---|
70 | |
---|
71 | /* we will not run this far */ |
---|
72 | } |
---|