source: rtems/testsuites/samples/ticker/system.h @ 3a9d9e1

4.115
Last change on this file since 3a9d9e1 was 7c1e6942, checked in by Joel Sherrill <joel.sherrill@…>, on 05/05/11 at 16:45:40

2011-05-05 Joel Sherrill <joel.sherrill@…>

  • base_sp/apptask.c, base_sp/init.c, fileio/init.c, fileio/system.h, nsecs/init.c, ticker/init.c, ticker/system.h, ticker/tasks.c: Remove warnings.
  • Property mode set to 100644
File size: 1.7 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.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#include <rtems.h>
17#include <inttypes.h>
18#include "../../support/include/buffer_test_io.h"
19#include "tmacros.h"
20
21/* functions */
22
23rtems_task Init(
24  rtems_task_argument argument
25);
26
27rtems_task Test_task(
28  rtems_task_argument argument
29);
30
31/* global variables */
32
33/*
34 *  Keep the names and IDs in global variables so another task can use them.
35 */
36
37extern rtems_id   Task_id[ 4 ];         /* array of task ids */
38extern rtems_name Task_name[ 4 ];       /* array of task names */
39
40
41/* configuration information */
42
43#include <bsp.h> /* for device driver prototypes */
44
45#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
46#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
47
48#define CONFIGURE_MAXIMUM_TASKS             4
49
50#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
51
52#define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
53
54#include <rtems/confdefs.h>
55
56/*
57 *  This allows us to view the "Test_task" instantiations as a set
58 *  of numbered tasks by eliminating the number of application
59 *  tasks created.
60 *
61 *  In reality, this is too complex for the purposes of this
62 *  example.  It would have been easier to pass a task argument. :)
63 *  But it shows how rtems_id's can sometimes be used.
64 */
65
66#define task_number( tid ) \
67  ( rtems_object_id_get_index( tid ) - \
68      rtems_configuration_get_rtems_api_configuration()-> \
69        number_of_initialization_tasks )
70
71/* end of include file */
Note: See TracBrowser for help on using the repository browser.