source: rtems/testsuites/smptests/smpfatal05/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: 2.2 KB
Line 
1/*
2 * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
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 <rtems.h>
22#include <rtems/score/smpimpl.h>
23
24#include <assert.h>
25#include <stdlib.h>
26
27const char rtems_test_name[] = "SMPFATAL 5";
28
29static void Init(rtems_task_argument arg)
30{
31  assert(0);
32}
33
34static void fatal_extension(
35  rtems_fatal_source source,
36  bool always_set_to_false,
37  rtems_fatal_code code
38)
39{
40  TEST_BEGIN();
41
42  if (
43    source == RTEMS_FATAL_SOURCE_SMP
44      && !always_set_to_false
45      && code == SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT
46  ) {
47    TEST_END();
48  }
49}
50
51#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
52#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
53
54#define CONFIGURE_INITIAL_EXTENSIONS \
55  { .fatal = fatal_extension }, \
56  RTEMS_TEST_INITIAL_EXTENSION
57
58/* Lets see when the first RTEMS system hits this limit */
59#define CONFIGURE_MAXIMUM_PROCESSORS 64
60
61#define CONFIGURE_SCHEDULER_SIMPLE_SMP
62
63#include <rtems/scheduler.h>
64
65RTEMS_SCHEDULER_SIMPLE_SMP(a);
66
67#define CONFIGURE_SCHEDULER_TABLE_ENTRIES \
68  RTEMS_SCHEDULER_TABLE_SIMPLE_SMP(a, rtems_build_name('S', 'I', 'M', 'P'))
69
70#define ASSIGN \
71  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY)
72
73#define CONFIGURE_SCHEDULER_ASSIGNMENTS \
74 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
75 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
76 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
77 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
78 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
79 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
80 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, \
81 ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN, ASSIGN
82
83#define CONFIGURE_MAXIMUM_TASKS 1
84
85#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
86
87#define CONFIGURE_INIT
88
89#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.