1 | #ifdef HAVE_CONFIG_H |
---|
2 | #include "config.h" |
---|
3 | #endif |
---|
4 | |
---|
5 | #include "../spfatal_support/spfatal.h" |
---|
6 | |
---|
7 | /* |
---|
8 | * Classic API Init task create failure |
---|
9 | * |
---|
10 | * COPYRIGHT (c) 1989-2009. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #define SPFATAL_TEST_CASE_EXTRA_TASKS 1 |
---|
19 | |
---|
20 | #define FATAL_ERROR_TEST_NAME "5" |
---|
21 | #define FATAL_ERROR_DESCRIPTION "Core fall out of a task" |
---|
22 | #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE |
---|
23 | #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_THREAD_EXITTED |
---|
24 | |
---|
25 | rtems_task EmptyTask( rtems_task_argument unused ); |
---|
26 | |
---|
27 | rtems_task EmptyTask( |
---|
28 | rtems_task_argument unused |
---|
29 | ) |
---|
30 | { |
---|
31 | } |
---|
32 | |
---|
33 | static void force_error(void) |
---|
34 | { |
---|
35 | rtems_id id; |
---|
36 | rtems_status_code status; |
---|
37 | |
---|
38 | status = rtems_task_create( |
---|
39 | rtems_build_name('T','A','0','1' ), |
---|
40 | 4, |
---|
41 | RTEMS_MINIMUM_STACK_SIZE, |
---|
42 | RTEMS_DEFAULT_MODES, |
---|
43 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
44 | &id |
---|
45 | ); |
---|
46 | directive_failed( status, "rtems_task_create" ); |
---|
47 | |
---|
48 | status = rtems_task_start( id, EmptyTask, 0 ); |
---|
49 | directive_failed( status, "rtems_task_start" ); |
---|
50 | |
---|
51 | status = rtems_task_wake_after( 100 ); |
---|
52 | directive_failed( status, "rtems_task_wake_after" ); |
---|
53 | |
---|
54 | /* we will not run this far */ |
---|
55 | } |
---|
56 | |
---|
57 | #include "../spfatal_support/spfatalimpl.h" |
---|