source: rtems/testsuites/sptests/sp07/system.h @ 3ac68119

4.115
Last change on this file since 3ac68119 was 3ac68119, checked in by Gedare Bloom <gedare@…>, on 03/06/15 at 17:41:49

cpukit: deprecate notepads

Deprecate Classic API Notepads. Mark task_set/get_note() with
the deprecated attribute, and also mark the notepads field.

Replace disable with enable option for notepads in confdefs.h,
and make notepads disabled by default. The previous option
CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is now unused and
will emit a compile-time warning. A new option
CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is available to turn
on notepads, but it also will emit a compile-time warning
to indicate that notepads are deprecated.

Closes #2265

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*  system.h
2 *
3 *  This include file contains information that is included in every
4 *  function in the test set.
5 *
6 *  COPYRIGHT (c) 1989-2009.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14#include <tmacros.h>
15
16/* functions */
17
18rtems_task Init(
19  rtems_task_argument argument
20);
21
22rtems_task Task_1(
23  rtems_task_argument argument
24);
25
26rtems_task Task_2(
27  rtems_task_argument argument
28);
29
30rtems_task Task_3(
31  rtems_task_argument argument
32);
33
34rtems_task Task_4(
35  rtems_task_argument argument
36);
37
38bool Task_create_extension(
39  rtems_tcb *unused,
40  rtems_tcb *created_task
41);
42
43void Task_delete_extension(
44  rtems_tcb *running_task,
45  rtems_tcb *deleted_task
46);
47
48void Task_restart_extension(
49  rtems_tcb *unused,
50  rtems_tcb *restarted_task
51);
52
53void Task_start_extension(
54  rtems_tcb *unused,
55  rtems_tcb *started_task
56);
57
58void Task_exit_extension(
59  rtems_tcb *running_task
60);
61
62/* configuration information */
63
64#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
65#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
66
67#define CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS
68
69#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     2
70#define CONFIGURE_TICKS_PER_TIMESLICE       100
71
72#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
73
74#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
75
76#define CONFIGURE_EXTRA_TASK_STACKS         (4 * RTEMS_MINIMUM_STACK_SIZE)
77#define CONFIGURE_MAXIMUM_TASKS             5
78
79#include <rtems/confdefs.h>
80
81/* global variables */
82
83TEST_EXTERN rtems_id   Task_id[ 5 ];         /* array of task ids */
84TEST_EXTERN rtems_name Task_name[ 5 ];       /* array of task names */
85
86TEST_EXTERN rtems_id   Extension_id[ 4 ];
87TEST_EXTERN rtems_name Extension_name[ 4 ];  /* array of task names */
88
89TEST_EXTERN int Task_created[ RTEMS_ARRAY_SIZE( Task_id ) ];
90
91TEST_EXTERN int Task_started[ RTEMS_ARRAY_SIZE( Task_id ) ];
92
93TEST_EXTERN int Task_restarted[ RTEMS_ARRAY_SIZE( Task_id ) ];
94
95TEST_EXTERN int Task_deleted[ RTEMS_ARRAY_SIZE( Task_id ) ];
96
97RTEMS_INLINE_ROUTINE void assert_extension_counts( const int *table, int tasks )
98{
99  size_t i;
100
101  for ( i = 0; i < RTEMS_ARRAY_SIZE( Task_id ); ++i ) {
102    rtems_test_assert(
103      ( tasks & ( 1 << i ) ) != 0 ? table[ i ] == 1 : table[ i ] == 0
104    );
105  }
106}
107
108/* end of include file */
Note: See TracBrowser for help on using the repository browser.