source: rtems/c/src/ada-tests/samples/base_mp/mptest.adb @ f619250

4.115
Last change on this file since f619250 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1--
2--  MPTEST / BODY
3--
4--  DESCRIPTION:
5--
6--  This package is the implementation for Test 1 of the RTEMS
7--  Multiprocessor Test Suite.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989-2011.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  The license and distribution terms for this file may in
17--  the file LICENSE in this distribution or at
18--  http://www.rtems.com/license/LICENSE.
19--
20
21with INTERFACES; use INTERFACES;
22with RTEMS;
23with RTEMS.INTERRUPT;
24with RTEMS.TASKS;
25with TEST_SUPPORT;
26with TEXT_IO;
27with UNSIGNED32_IO;
28
29package body MPTEST is
30
31--
32--  INIT
33--
34
35   procedure INIT (
36      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
37   ) is
38      STATUS : RTEMS.STATUS_CODES;
39   begin
40
41      TEXT_IO.NEW_LINE( 2 );
42      TEXT_IO.PUT( "*** SAMPLE MULTIPROCESSOR APPLICATION ***" );
43      TEXT_IO.PUT( "Creating and starting an application task" );
44
45
46      MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME(  'T', 'A', '1', ' ' );
47
48      RTEMS.TASKS.CREATE(
49         MPTEST.TASK_NAME( 1 ),
50         1,
51         2048,
52         RTEMS.INTERRUPT_LEVEL( 0 ),
53         RTEMS.DEFAULT_ATTRIBUTES,
54         MPTEST.TASK_ID( 1 ),
55         STATUS
56      );
57      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
58
59      RTEMS.TASKS.START(
60         MPTEST.TASK_ID( 1 ),
61         MPTEST.APPLICATION_TASK'ACCESS,
62         0,
63         STATUS
64      );
65      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
66
67      RTEMS.TASKS.DELETE( RTEMS.SELF, STATUS );
68      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
69
70   end INIT;
71
72--
73--  APPLICATION_TASK
74--
75
76   procedure APPLICATION_TASK (
77      ARGUMENT : in     RTEMS.TASKS.ARGUMENT
78   ) is
79      TID    : RTEMS.ID;
80      STATUS : RTEMS.STATUS_CODES;
81   begin
82
83      RTEMS.TASKS.IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
84      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
85   
86      TEXT_IO.PUT( "This task was invoked with node argument (" );
87      UNSIGNED32_IO.PUT( ARGUMENT );
88      TEXT_IO.PUT_LINE( ")" );
89
90      TEXT_IO.PUT( "This task has the id of  0x" );
91      UNSIGNED32_IO.PUT( TID, BASE => 16 );
92      TEXT_IO.NEW_LINE;
93 
94      TEXT_IO.PUT_LINE( "*** END OF SAMPLE MULTIPROCESSOR APPLICATION  ***" );
95
96      RTEMS.SHUTDOWN_EXECUTIVE( 0 );
97
98   end APPLICATION_TASK;
99
100end MPTEST;
Note: See TracBrowser for help on using the repository browser.