source: rtems/testsuites/sptests/spinternalerror01/init.c @ 6fadb7af

5
Last change on this file since 6fadb7af was 6fadb7af, checked in by Sebastian Huber <sebastian.huber@…>, on Mar 8, 2018 at 5:33:24 AM

config: Use new scheduler configuration defines

Update #3325.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Obere Lagerstr. 30
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifdef HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include "tmacros.h"
20
21#include <bsp.h>
22#include <bsp/bootcard.h>
23
24const char rtems_test_name[] = "SPINTERNALERROR 1";
25
26#define FATAL_SOURCE 0xdeadbeef
27
28#define FATAL_ERROR 0x600df00d
29
30void boot_card( const char *cmdline )
31{
32  _Terminate( FATAL_SOURCE, FATAL_ERROR );
33}
34
35static void fatal_extension(
36  Internal_errors_Source source,
37  bool always_set_to_false,
38  Internal_errors_t error
39)
40{
41  TEST_BEGIN();
42
43  if (
44    source == FATAL_SOURCE
45      && !always_set_to_false
46      && error == FATAL_ERROR
47  ) {
48    TEST_END();
49  }
50}
51
52static void *idle_body(uintptr_t ignored)
53{
54  while ( true ) {
55    /* Do nothing */
56  }
57
58  return NULL;
59}
60
61#define CONFIGURE_INITIAL_EXTENSIONS \
62  { .fatal = fatal_extension }, \
63  RTEMS_TEST_INITIAL_EXTENSION
64
65#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
66
67#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
68
69#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
70
71#define CONFIGURE_SCHEDULER_USER
72
73#define CONFIGURE_SCHEDULER
74
75#define CONFIGURE_SCHEDULER_TABLE_ENTRIES { }
76
77#define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER 0
78
79#define CONFIGURE_TASK_STACK_ALLOCATOR NULL
80
81#define CONFIGURE_TASK_STACK_DEALLOCATOR NULL
82
83#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
84
85#define CONFIGURE_IDLE_TASK_BODY idle_body
86
87#define CONFIGURE_INIT
88
89#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.