source: rtems/testsuites/mptests/mp11/init.c @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 11, 1995 at 7:35:39 PM

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*  Init
2 *
3 *  This routine is the initialization and test routine for
4 *  this test program.  It attempts to create more global
5 *  objects than are configured (zero should be configured).
6 *  This routine is the initialization task for this test program.
7 *  It is a user initialization task and has the responsibility for creating
8 *  and starting the tasks that make up the test.  If the time of day
9 *  clock is required for the test, it should also be set to a known
10 *  value by this function.
11 *
12 *  Input parameters:
13 *    argument - task argument
14 *
15 *  Output parameters:  NONE
16 *
17 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
18 *  On-Line Applications Research Corporation (OAR).
19 *  All rights assigned to U.S. Government, 1994.
20 *
21 *  This material may be reproduced by or for the U.S. Government pursuant
22 *  to the copyright license under the clause at DFARS 252.227-7013.  This
23 *  notice must appear in all copies of this file and its derivatives.
24 *
25 *  $Id$
26 */
27
28#define TEST_INIT
29#include "system.h"
30
31rtems_unsigned8 my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
32
33rtems_task Init(
34  rtems_task_argument argument
35)
36{
37  rtems_id          junk_id;
38  rtems_status_code status;
39
40  printf(
41    "\n\n*** TEST 11 -- NODE %d ***\n",
42    Multiprocessing_configuration.node
43  );
44
45  Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
46  Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
47
48  Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
49
50  Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
51
52  if ( Multiprocessing_configuration.node == 1 ) {
53    puts( "Attempting to create Test_task (Global)" );
54    status = rtems_task_create(
55      Task_name[ 1 ],
56      1,
57      1024,
58      RTEMS_DEFAULT_MODES,
59      RTEMS_GLOBAL,
60      &junk_id
61    );
62    fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_task_create" );
63    puts( "rtems_task_create correctly returned RTEMS_TOO_MANY" );
64
65    puts( "Attempting to create Message Queue (Global)" );
66    status = rtems_message_queue_create(
67      Queue_name[ 1 ],
68      3,
69      16,
70      RTEMS_GLOBAL,
71      &junk_id
72    );
73    fatal_directive_status(
74      status,
75      RTEMS_TOO_MANY,
76      "rtems_message_queue_create"
77    );
78    puts( "rtems_message_queue_create correctly returned RTEMS_TOO_MANY" );
79
80    puts( "Attempting to create Semaphore (Global)" );
81    status = rtems_semaphore_create(
82      Semaphore_name[ 1 ],
83      1,
84      RTEMS_GLOBAL,
85      RTEMS_NO_PRIORITY,
86      &junk_id
87    );
88    fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_semaphore_create" );
89    puts( "rtems_semaphore_create correctly returned RTEMS_TOO_MANY" );
90
91    puts( "Attempting to create Partition (Global)" );
92    status = rtems_partition_create(
93      1,
94      (rtems_unsigned8 *) my_partition,
95      128,
96      64,
97      RTEMS_GLOBAL,
98      &junk_id
99    );
100    fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_partition_create" );
101    puts( "rtems_partition_create correctly returned RTEMS_TOO_MANY" );
102  }
103  puts( "*** END OF TEST 11 ***" );
104  exit( 0 );
105}
Note: See TracBrowser for help on using the repository browser.