source: rtems/testsuites/sptests/spfatal29/init.c @ c7f748a

5
Last change on this file since c7f748a was c7f748a, checked in by Sebastian Huber <sebastian.huber@…>, on 02/15/20 at 11:07:28

config: Remove CONFIGURE_DISABLE_SMP_CONFIGURATION

The CONFIGURE_DISABLE_SMP_CONFIGURATION configuration option and
rtems_configuration_is_smp_enabled() were added during the SMP support
development cycle as a workaround to fix some testsuite failures in SMP
configurations. All use cases were replaced with tests for specific
conditions. The configuration option and test macro were undocumented.

Close #3876.

  • Property mode set to 100644
File size: 1.2 KB
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
28static void timer(rtems_id id, void *arg)
29{
30  rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
31}
32
33static void force_error(void)
34{
35  rtems_status_code sc;
36  rtems_id id;
37
38  sc = rtems_timer_create(
39    rtems_build_name('T', 'I', 'M', 'E'),
40    &id
41  );
42  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
43
44  sc = rtems_timer_fire_after(id, 1, timer, NULL);
45  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
46
47  rtems_task_exit();
48}
49
50#include "../spfatal_support/spfatalimpl.h"
Note: See TracBrowser for help on using the repository browser.