OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [tests/] [sptests/] [sp09/] [screen08.c] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  Screen8
2
 *
3
 *  This routine generates error screen 8 for test 9.
4
 *
5
 *  Input parameters:  NONE
6
 *
7
 *  Output parameters:  NONE
8
 *
9
 *  COPYRIGHT (c) 1989-1999.
10
 *  On-Line Applications Research Corporation (OAR).
11
 *
12
 *  The license and distribution terms for this file may be
13
 *  found in the file LICENSE in this distribution or at
14
 *  http://www.OARcorp.com/rtems/license.html.
15
 *
16
 *  $Id: screen08.c,v 1.2 2001-09-27 12:02:31 chris Exp $
17
 */
18
 
19
#include "system.h"
20
 
21
#define MESSAGE_SIZE (sizeof(long) * 4)
22
 
23
void Screen8()
24
{
25
  long              buffer[ 4 ];
26
  rtems_status_code status;
27
 
28
  status = rtems_message_queue_delete( Queue_id[ 1 ] );
29
  directive_failed( status, "rtems_message_queue_delete successful" );
30
  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
31
 
32
  status = rtems_message_queue_create(
33
    Queue_name[ 1 ],
34
    2,
35
    MESSAGE_SIZE,
36
    RTEMS_DEFAULT_ATTRIBUTES,
37
    &Queue_id[ 1 ]
38
  );
39
  directive_failed( status, "rtems_message_queue_create successful" );
40
  puts(
41
    "TA1 - rtems_message_queue_create - Q 1 - 2 DEEP - RTEMS_SUCCESSFUL"
42
  );
43
 
44
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
45
  directive_failed( status, "rtems_message_queue_send successful" );
46
  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
47
 
48
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
49
  directive_failed( status, "rtems_message_queue_send successful" );
50
  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
51
 
52
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
53
  fatal_directive_status(
54
    status,
55
    RTEMS_TOO_MANY,
56
    "rtems_message_queue_send too many to limited queue"
57
  );
58
  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_TOO_MANY" );
59
 
60
  status = rtems_message_queue_delete( Queue_id[ 1 ] );
61
  directive_failed( status, "rtems_message_queue_delete successful" );
62
  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
63
 
64
  status = rtems_message_queue_create(
65
    Queue_name[ 1 ],
66
    3,
67
    MESSAGE_SIZE,
68
    RTEMS_DEFAULT_ATTRIBUTES,
69
    &Queue_id[ 1 ]
70
  );
71
  directive_failed( status, "rtems_message_queue_create successful" );
72
  puts(
73
    "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
74
  );
75
 
76
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
77
  directive_failed( status, "rtems_message_queue_send successful" );
78
  puts( "TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1 - RTEMS_SUCCESSFUL" );
79
 
80
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
81
  directive_failed( status, "rtems_message_queue_send successful" );
82
  puts( "TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1 - RTEMS_SUCCESSFUL" );
83
 
84
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
85
  directive_failed( status, "rtems_message_queue_send successful" );
86
  puts( "TA1 - rtems_message_queue_send - BUFFER 3 TO Q 1 - RTEMS_SUCCESSFUL" );
87
 
88
  status = rtems_message_queue_send( Queue_id[ 1 ], buffer, MESSAGE_SIZE );
89
  fatal_directive_status(
90
    status,
91
    RTEMS_TOO_MANY,
92
    "rtems_message_queue_send too many to limited queue"
93
  );
94
  puts(
95
    "TA1 - rtems_message_queue_send - BUFFER 4 TO Q 1 - RTEMS_TOO_MANY"
96
  );
97
 
98
  status = rtems_message_queue_delete( Queue_id[ 1 ] );
99
  directive_failed( status, "rtems_message_queue_delete successful" );
100
  puts( "TA1 - rtems_message_queue_delete - Q 1 - RTEMS_SUCCESSFUL" );
101
 
102
  status = rtems_message_queue_create(
103
    Queue_name[ 1 ],
104
    3,
105
    MESSAGE_SIZE,
106
    RTEMS_DEFAULT_ATTRIBUTES,
107
    &Queue_id[ 1 ]
108
  );
109
  directive_failed( status, "rtems_message_queue_create successful" );
110
  puts(
111
    "TA1 - rtems_message_queue_create - Q 1 - 3 DEEP - RTEMS_SUCCESSFUL"
112
  );
113
 
114
  puts( "TA1 - rtems_task_start - start TA3 - RTEMS_SUCCESSFUL" );
115
  status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
116
  directive_failed( status, "rtems_task_start of TA3" );
117
 
118
  puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
119
  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
120
  directive_failed( status, "rtems_task_wake_after (yield)" );
121
 
122
  puts( "TA1 - rtems_message_queue_delete - delete Q 1 - RTEMS_SUCCESSFUL" );
123
  status = rtems_message_queue_delete( Queue_id[ 1 ] );
124
  directive_failed( status, "rtems_message_queue_delete successful" );
125
 
126
  puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
127
  status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
128
  directive_failed( status, "rtems_task_wake_after (yield)" );
129
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.