summaryrefslogtreecommitdiffstats
path: root/c/src/tests/libtests/rtems++/System.h
blob: 4ba340fcce24ea5c1bafb0c9716113e88dd7d478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*  system.h
 *
 *  This include file contains information that is included in every
 *  function in the test set.
 *
 *  COPYRIGHT (c) 1989-1997.
 *  On-Line Applications Research Corporation (OAR).
 *  Copyright assigned to U.S. Government, 1994.
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.OARcorp.com/rtems/license.html.
 *
 *  $Id$
 */

#include <tmacros.h>
#include <rtems++/rtemsEvent.h>
#include <rtems++/rtemsMessageQueue.h>
#include <rtems++/rtemsTask.h>
#include <rtems++/rtemsTaskMode.h>

/* functions */

extern "C"
{  
  rtems_task Init(
    rtems_task_argument argument
    );
}

rtems_timer_service_routine Delayed_routine(
  rtems_id  ignored_id,
  void     *ignored_address
);

class Task1
  : public rtemsTask
{
  void print_mode(rtems_mode mode, rtems_mode mask);
  
  void screen1(void);
  void screen2(void);
  void screen3(void);
  void screen4(void);
  void screen5(void);
  void screen6(void);

protected:
  virtual void body(rtems_task_argument argument);

public:
};

class Task2
  : public rtemsTask
{
  void screen4(void);

protected:
  virtual void body(rtems_task_argument argument);

public:  
  Task2(const char* name,
        const rtems_task_priority initial_priority,
        const rtems_unsigned32 stack_size);
};

class Task3
  : public rtemsTask
{
  void screen6(void);

protected:
  virtual void body(rtems_task_argument argument);

public:  
  Task3(const char* name,
        const rtems_task_priority initial_priority,
        const rtems_unsigned32 stack_size);
};

class EndTask
  : public rtemsTask
{
protected:
  virtual void body(rtems_task_argument argument);

public:  
  EndTask(const char* name,
          const rtems_task_priority initial_priority,
          const rtems_unsigned32 stack_size);
};

#if 0

//
// Not sure this can be tested in a generic manner, any ideas anyone !!
//

class Service_routine
  : public rtemsInterrupt
{
};

class Io_during_interrupt
  : pubic rtemsTimer
{

};

#endif

/* configuration information */

#define CONFIGURE_SPTEST

#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER

#define CONFIGURE_MAXIMUM_TIMERS              1
#define CONFIGURE_MAXIMUM_SEMAPHORES          2
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES      1
#define CONFIGURE_MAXIMUM_PARTITIONS          1
#define CONFIGURE_MAXIMUM_REGIONS             1
#define CONFIGURE_MAXIMUM_PERIODS             1
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     0
#define CONFIGURE_TICKS_PER_TIMESLICE       100

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE        0x2000

#include <confdefs.h>

/* end of include file */