source: rtems/testsuites/sptests/sp16/task5.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 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.2 KB
Line 
1/*  Task5
2 *
3 *  This routine serves as a test task.  It competes with the other tasks
4 *  for region resources.
5 *
6 *  Input parameters:
7 *    argument - task argument
8 *
9 *  Output parameters:  NONE
10 *
11 *  COPYRIGHT (c) 1989-2009.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.com/license/LICENSE.
17 */
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include "system.h"
24
25rtems_task Task5(
26  rtems_task_argument argument
27)
28{
29  void              *segment_address_1;
30  void              *segment_address_2;
31  rtems_status_code  status;
32
33  puts( "TA5 - rtems_region_get_segment - wait on 1.5K segment from region 1" );
34  status = rtems_region_get_segment(
35    Region_id[ 1 ],
36    1536,
37    RTEMS_DEFAULT_OPTIONS,
38    RTEMS_NO_TIMEOUT,
39    &segment_address_1
40  );
41  directive_failed( status, "rtems_region_get_segment" );
42
43  status = rtems_region_return_segment( Region_id[ 1 ], segment_address_1 );
44  directive_failed( status, "rtems_region_return_segment" );
45  puts_nocr( "TA5 - got and returned " );
46  Put_address_from_area_1( segment_address_1 );
47  new_line;
48
49  /*
50   * Use TOD_MICROSECONDS_TO_TICKS not RTEMS_MICROSECONDS_TO_TICKS to
51   * test C implementation in SuperCore -- not macro version used
52   * everywhere else.
53   */
54  status = rtems_task_wake_after( TOD_MICROSECONDS_TO_TICKS( 1000000 ) );
55  directive_failed( status, "rtems_task_wake_after" );
56
57  puts( "TA5 - rtems_region_get_segment - wait on 3K segment from region 1" );
58  status = rtems_region_get_segment(
59    Region_id[ 1 ],
60    3072,
61    RTEMS_DEFAULT_OPTIONS,
62    RTEMS_NO_TIMEOUT,
63    &segment_address_2
64  );
65  puts_nocr( "TA5 - got segment from region 1 - " );
66  Put_address_from_area_1( segment_address_2 );
67  new_line;
68
69  status = rtems_region_return_segment( Region_id[ 1 ], segment_address_2 );
70  puts_nocr(
71    "TA5 - rtems_region_return_segment - return segment to region 1 - "
72  );
73  Put_address_from_area_1( segment_address_2 );
74  new_line;
75
76  puts( "TA5 - rtems_task_delete - delete self" );
77  status = rtems_task_delete( RTEMS_SELF );
78  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
79}
Note: See TracBrowser for help on using the repository browser.