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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [tests/] [sptests/] [sp09/] [screen09.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*  Screen9
2
 *
3
 *  This routine generates error screen 9 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 208 chris
 *  $Id: screen09.c,v 1.2 2001-09-27 12:02:31 chris Exp $
17 158 chris
 */
18
 
19
#include "system.h"
20
 
21
void Screen9()
22
{
23
  void              *converted;
24
  rtems_status_code status;
25
  rtems_isr_entry   old_service_routine;
26
 
27
  status = rtems_interrupt_catch(
28
    Service_routine,
29
    ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 10,
30
    &old_service_routine
31
  );
32
  fatal_directive_status(
33
    status,
34
    RTEMS_INVALID_NUMBER,
35
    "rtems_interrupt_catch with invalid vector"
36
  );
37
  puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
38
 
39
  status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
40
  fatal_directive_status(
41
    status,
42
    RTEMS_INVALID_ADDRESS,
43
    "rtems_interrupt_catch with invalid handler"
44
  );
45
  puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" );
46
 
47
  status = rtems_interrupt_catch( Service_routine, 3, NULL );
48
  fatal_directive_status(
49
    status,
50
    RTEMS_INVALID_ADDRESS,
51
    "rtems_interrupt_catch with invalid old isr pointer"
52
  );
53
  puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" );
54
 
55
  status = rtems_signal_send( 100, RTEMS_SIGNAL_1 );
56
  fatal_directive_status(
57
    status,
58
    RTEMS_INVALID_ID,
59
    "rtems_signal_send with illegal id"
60
  );
61
  puts( "TA1 - rtems_signal_send - RTEMS_INVALID_ID" );
62
 
63
  status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_16 );
64
  fatal_directive_status(
65
    status,
66
    RTEMS_NOT_DEFINED,
67
    "rtems_signal_send with no handler"
68
  );
69
  puts( "TA1 - rtems_signal_send - RTEMS_NOT_DEFINED" );
70
 
71
  status = rtems_port_create(
72
     0,
73
     Internal_port_area,
74
     External_port_area,
75
     sizeof( Internal_port_area ),
76
     &Junk_id
77
  );
78
  fatal_directive_status(
79
    status,
80
    RTEMS_INVALID_NAME,
81
    "rtems_port_create with illegal name"
82
  );
83
  puts( "TA1 - rtems_port_create - RTEMS_INVALID_NAME" );
84
 
85
  status = rtems_port_create(
86
     Port_name[ 1 ],
87
     &((char *)Internal_port_area)[ 1 ],
88
     External_port_area,
89
     sizeof( Internal_port_area ),
90
     &Junk_id
91
  );
92
  fatal_directive_status(
93
    status,
94
    RTEMS_INVALID_ADDRESS,
95
    "rtems_port_create with illegal address"
96
  );
97
  puts( "TA1 - rtems_port_create - RTEMS_INVALID_ADDRESS" );
98
 
99
  status = rtems_port_create(
100
     Port_name[ 1 ],
101
     Internal_port_area,
102
     External_port_area,
103
     sizeof( Internal_port_area ),
104
     &Junk_id
105
  );
106
  fatal_directive_status(
107
    status,
108
    RTEMS_TOO_MANY,
109
    "rtems_port_create of too many"
110
  );
111
  puts( "TA1 - rtems_port_create - RTEMS_TOO_MANY" );
112
 
113
  status = rtems_port_delete( 0 );
114
  fatal_directive_status(
115
    status,
116
    RTEMS_INVALID_ID,
117
    "rtems_port_delete with illegal id"
118
  );
119
  puts( "TA1 - rtems_port_delete - RTEMS_INVALID_ID" );
120
 
121
  status = rtems_port_ident( 0, &Junk_id );
122
  fatal_directive_status(
123
    status,
124
    RTEMS_INVALID_NAME,
125
    "rtems_port_ident with illegal name"
126
  );
127
  puts( "TA1 - rtems_port_ident - RTEMS_INVALID_NAME" );
128
 
129
  status = rtems_port_external_to_internal(
130
    100,
131
    Internal_port_area,
132
    &converted
133
  );
134
  fatal_directive_status(
135
    status,
136
    RTEMS_INVALID_ID,
137
    "rtems_port_external_to_internal with illegal id"
138
  );
139
  puts( "TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ID" );
140
  status = rtems_port_internal_to_external(
141
    100,
142
    Internal_port_area,
143
    &converted
144
  );
145
  fatal_directive_status(
146
    status,
147
    RTEMS_INVALID_ID,
148
    "rtems_port_internal_to_external with illegal id"
149
  );
150
  puts( "TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID" );
151
}

powered by: WebSVN 2.1.0

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