source: rtems/testsuites/sptests/sptls03/init.c @ 5da717a

4.115
Last change on this file since 5da717a was 5da717a, checked in by Joel Sherrill <joel.sherrill@…>, on 03/20/15 at 22:56:56

sptls03/init.c: Make type and constants uint32_t to avoid overflow warnings

  • Property mode set to 100644
File size: 1.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 <rtems/score/thread.h>
20
21#include "tmacros.h"
22
23const char rtems_test_name[] = "SPTLS 3";
24
25static volatile uint32_t read_write_small = 0xdeadbeefUL;
26
27static const volatile uint32_t read_only_small = 0x601dc0feUL;
28
29static void test(void)
30{
31  Thread_Control *executing = _Thread_Get_executing();
32
33  rtems_test_assert(read_write_small == 0xdeadbeefUL);
34  rtems_test_assert(read_only_small == 0x601dc0feUL);
35
36  rtems_test_assert(executing->Start.tls_area == NULL);
37}
38
39static void Init(rtems_task_argument arg)
40{
41  TEST_BEGIN();
42
43  test();
44
45  TEST_END();
46
47  rtems_test_exit(0);
48}
49
50#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
51#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
52
53#define CONFIGURE_MAXIMUM_TASKS 1
54
55#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
56
57#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
58
59#define CONFIGURE_INIT
60
61#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.