5
Line | |
---|
1 | #ifdef HAVE_CONFIG_H |
---|
2 | #include "config.h" |
---|
3 | #endif |
---|
4 | |
---|
5 | #include "../spfatal_support/spfatal.h" |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2016 embedded brains GmbH. All rights reserved. |
---|
9 | * |
---|
10 | * embedded brains GmbH |
---|
11 | * Dornierstr. 4 |
---|
12 | * 82178 Puchheim |
---|
13 | * Germany |
---|
14 | * <rtems@embedded-brains.de> |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.org/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #define FATAL_ERROR_TEST_NAME "29" |
---|
22 | #define FATAL_ERROR_DESCRIPTION "yield in interrupt context" |
---|
23 | #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE |
---|
24 | #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL |
---|
25 | |
---|
26 | #define CONFIGURE_MAXIMUM_TIMERS 1 |
---|
27 | |
---|
28 | #define CONFIGURE_DISABLE_SMP_CONFIGURATION |
---|
29 | |
---|
30 | static void timer(rtems_id id, void *arg) |
---|
31 | { |
---|
32 | rtems_task_wake_after(RTEMS_YIELD_PROCESSOR); |
---|
33 | } |
---|
34 | |
---|
35 | static void force_error(void) |
---|
36 | { |
---|
37 | rtems_status_code sc; |
---|
38 | rtems_id id; |
---|
39 | |
---|
40 | sc = rtems_timer_create( |
---|
41 | rtems_build_name('T', 'I', 'M', 'E'), |
---|
42 | &id |
---|
43 | ); |
---|
44 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
45 | |
---|
46 | sc = rtems_timer_fire_after(id, 1, timer, NULL); |
---|
47 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
48 | |
---|
49 | rtems_task_exit(); |
---|
50 | } |
---|
51 | |
---|
52 | #include "../spfatal_support/spfatalimpl.h" |
---|
Note: See
TracBrowser
for help on using the repository browser.