source: rtems/testsuites/sptests/spmisc01/init.c @ fe46647e

5
Last change on this file since fe46647e was fe46647e, checked in by Sebastian Huber <sebastian.huber@…>, on 06/15/18 at 14:53:27

score: Macros to declare and define global symbols

Add RTEMS_DEFINE_GLOBAL_SYMBOL() and add RTEMS_DECLARE_GLOBAL_SYMBOL().

Update #3459.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * Copyright (c) 2018 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 <rtems.h>
20
21#include <tmacros.h>
22
23const char rtems_test_name[] = "SPMISC 1";
24
25RTEMS_DECLARE_GLOBAL_SYMBOL(a_global_symbol);
26
27RTEMS_DEFINE_GLOBAL_SYMBOL(a_global_symbol, 0xabc);
28
29static void Init(rtems_task_argument arg)
30{
31  TEST_BEGIN();
32  rtems_test_assert((uintptr_t)a_global_symbol == 0xabc);
33  TEST_END();
34  rtems_test_exit(0);
35}
36
37#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
38
39#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
40
41#define CONFIGURE_MAXIMUM_TASKS 1
42
43#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
44
45#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
46
47#define CONFIGURE_INIT
48
49#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.