4.115
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 | const char rtems_test_name[] = "PSXGLOBALCON 2"; |
---|
22 | |
---|
23 | class A { |
---|
24 | public: |
---|
25 | A() |
---|
26 | { |
---|
27 | ++i; |
---|
28 | } |
---|
29 | |
---|
30 | static int i; |
---|
31 | }; |
---|
32 | |
---|
33 | int A::i; |
---|
34 | |
---|
35 | static A a; |
---|
36 | |
---|
37 | static bool rtems_init_done; |
---|
38 | |
---|
39 | extern "C" void Init(rtems_task_argument argument) |
---|
40 | { |
---|
41 | TEST_BEGIN(); |
---|
42 | |
---|
43 | rtems_test_assert(a.i == 1); |
---|
44 | |
---|
45 | rtems_init_done = true; |
---|
46 | |
---|
47 | rtems_task_delete(RTEMS_SELF); |
---|
48 | rtems_test_assert(0); |
---|
49 | } |
---|
50 | |
---|
51 | static void *POSIX_Init(void *argument) |
---|
52 | { |
---|
53 | rtems_test_assert(rtems_init_done); |
---|
54 | rtems_test_assert(a.i == 1); |
---|
55 | |
---|
56 | TEST_END(); |
---|
57 | rtems_test_exit(0); |
---|
58 | } |
---|
59 | |
---|
60 | #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER |
---|
61 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
62 | |
---|
63 | #define CONFIGURE_MAXIMUM_TASKS 1 |
---|
64 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 1 |
---|
65 | |
---|
66 | #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION |
---|
67 | |
---|
68 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
69 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
70 | |
---|
71 | #define CONFIGURE_INIT |
---|
72 | |
---|
73 | #include <rtems/confdefs.h> |
---|
Note: See
TracBrowser
for help on using the repository browser.