source: rtems/testsuites/sptests/sp13/system.h @ 99de42c

5
Last change on this file since 99de42c was c4b8b147, checked in by Sebastian Huber <sebastian.huber@…>, on 11/03/17 at 07:35:38

tests: Use simple console driver

Update #3170.
Update #3199.

  • Property mode set to 100644
File size: 2.9 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
22void Fill_buffer(
23  char  source[],
24  long *buffer
25);
26
27void Put_buffer(
28  void *buffer
29);
30
31rtems_task Task_1(
32  rtems_task_argument argument
33);
34
35rtems_task Task_2(
36  rtems_task_argument argument
37);
38
39rtems_task Task_3(
40  rtems_task_argument argument
41);
42
43/* global variables */
44
45TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
46TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
47
48TEST_EXTERN rtems_id   Queue_id[ 4 ];        /* array of queue ids */
49TEST_EXTERN rtems_name Queue_name[ 4 ];      /* array of queue names */
50
51/* test configuration */
52
53#define MESSAGE_SIZE (sizeof(long) * 4)  /* must be multiple of sizeof(long) */
54
55/* configuration information */
56
57#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
58#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
59
60#define CONFIGURE_MAXIMUM_TASKS               4
61#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES     10
62#define CONFIGURE_TICKS_PER_TIMESLICE       100
63
64#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
65
66#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
67
68/*
69 *  Created in init.c:
70 *    Q1 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) (1600)
71 *    Q2 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 10, MESSAGE_SIZE )   (160)
72 *    Q3 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) (1600)
73 *
74 *  Q1 and Q2 deleted in task1.c.
75 *
76 *  Q1 recreated in task1.c:
77 *    Q1 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, 20 )           (2000)
78 *
79 *  Q1 deleted again in task1.c.
80 *
81 *  Q1 repeatedly created and deleted for 2 messages of 1-1030 bytes
82 *  in length. Account for peak usage:
83 *    Q1 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 2, 1030 )           (2060)
84 *
85 *  Because each message requires memory for the message plus two
86 *  pointers to place the buffer on lists, it is easier to just
87 *  allocate memory for all the message queues. But we can safely
88 *  ignore Q2 and the last instance of Q1 since enough memory is
89 *  free when the third instance of Q1 is created.
90 */
91#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
92   /* Q1 */ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) + \
93   /* Q2 */ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 10, MESSAGE_SIZE ) + \
94   /* Q3 */ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) + \
95   /* Q1 */ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, 20 ) + \
96   /* Q1 */ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 2,  1030 )
97
98#define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
99
100#define CONFIGURE_DISABLE_SMP_CONFIGURATION
101
102#include <rtems/confdefs.h>
103
104/* end of include file */
Note: See TracBrowser for help on using the repository browser.