source: rtems/c/src/tests/samples/unlimited/system.h @ dee8a51

4.104.114.84.95
Last change on this file since dee8a51 was f4a8ee1, checked in by Joel Sherrill <joel.sherrill@…>, on 03/17/99 at 16:01:03

Unlimited objects patch from Chris Johns <ccj@…>. Email follows:

First, the unlimited patch. I have compiled the unlmited patch for the
Linux posix BSP only and it seems to work cleanly. I would like a really
major application run on this change before commiting as the changes are
very core and significant. I am currently building all the tests to run.

I have no targets suitable to test on at the moment.

I have tested the patch for inline functions and macros.

Turning macros on has found some core bugs. I have fixed these but have
not run all the tests. Please review the patch for these changes. They
are:

1) The conditional compilation for MP support broke the core messages
code. You cannot embed a conditional macro in another macro. The Send
and Urgent Send calls are macros.

2) User extensions handler initialisation now has two parameters. I have
updated the macros to support the extra parameter.

The patch also contains the gcc-target-default.cfg fix required to build
the kernel. More of a by product than a fix for you.

  • Property mode set to 100644
File size: 2.1 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-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may in
11 *  the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#include <rtems.h>
18
19#define TASK_ALLOCATION_SIZE     (5)
20#define CONFIGURE_MAXIMUM_TASKS  rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
21
22#include <tmacros.h>
23
24/* functions */
25
26rtems_task Init(
27  rtems_task_argument argument
28);
29
30rtems_task test_task(
31  rtems_task_argument my_number
32);
33
34void
35destory_all_tasks(
36  const char *who
37);
38
39boolean status_code_bad(
40  rtems_status_code status_code
41);
42
43void test1();
44void test2();
45void test3();
46
47/* configuration information */
48
49#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
50
51#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
52
53#include <confdefs.h>
54
55/* global variables */
56
57TEST_EXTERN rtems_id Global_variable;   /* example global variable     */
58
59/*
60 * Keep track of the task id's created, use a large array.
61 */
62
63#define MAX_TASKS         (1000)
64#define TASK_INDEX_OFFSET (1)
65
66extern rtems_id task_id[MAX_TASKS];
67
68/*
69 * Increment the task name.
70 */
71
72#define NEXT_TASK_NAME(c1, c2, c3, c4)  \
73                 if (c4 == '9') {       \
74                   if (c3 == '9') {     \
75                     if (c2 == 'z') {   \
76                       if (c1 == 'z') { \
77                         printf("not enough task letters for names !!!\n"); \
78                         exit( 1 );     \
79                       } else           \
80                         c1++;          \
81                       c2 = 'a';        \
82                     } else             \
83                      c2++;             \
84                     c3 = '0';          \
85                   } else               \
86                     c3++;              \
87                   c4 = '0';            \
88                 }                      \
89                 else                   \
90                   c4++                 \
91
92
93/* end of include file */
Note: See TracBrowser for help on using the repository browser.