[ac7d5ef0] | 1 | /* Screen9 |
---|
| 2 | * |
---|
| 3 | * This routine generates error screen 9 for test 9. |
---|
| 4 | * |
---|
| 5 | * Input parameters: NONE |
---|
| 6 | * |
---|
| 7 | * Output parameters: NONE |
---|
| 8 | * |
---|
[03f2154e] | 9 | * COPYRIGHT (c) 1989-1997. |
---|
[ac7d5ef0] | 10 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 11 | * Copyright assigned to U.S. Government, 1994. |
---|
[ac7d5ef0] | 12 | * |
---|
[98e4ebf5] | 13 | * The license and distribution terms for this file may be |
---|
| 14 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 15 | * http://www.OARcorp.com/rtems/license.html. |
---|
[ac7d5ef0] | 16 | * |
---|
[3235ad9] | 17 | * $Id$ |
---|
[ac7d5ef0] | 18 | */ |
---|
| 19 | |
---|
| 20 | #include "system.h" |
---|
| 21 | |
---|
| 22 | void Screen9() |
---|
| 23 | { |
---|
| 24 | void *converted; |
---|
| 25 | rtems_status_code status; |
---|
| 26 | rtems_isr_entry old_service_routine; |
---|
| 27 | |
---|
[9700578] | 28 | status = rtems_interrupt_catch( |
---|
| 29 | Service_routine, |
---|
| 30 | ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 10, |
---|
| 31 | &old_service_routine |
---|
| 32 | ); |
---|
[ac7d5ef0] | 33 | fatal_directive_status( |
---|
| 34 | status, |
---|
| 35 | RTEMS_INVALID_NUMBER, |
---|
| 36 | "rtems_interrupt_catch with invalid vector" |
---|
| 37 | ); |
---|
| 38 | puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" ); |
---|
| 39 | |
---|
| 40 | status = rtems_interrupt_catch( NULL, 3, &old_service_routine ); |
---|
| 41 | fatal_directive_status( |
---|
| 42 | status, |
---|
| 43 | RTEMS_INVALID_ADDRESS, |
---|
| 44 | "rtems_interrupt_catch with invalid handler" |
---|
| 45 | ); |
---|
[3dbcece] | 46 | puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" ); |
---|
| 47 | |
---|
| 48 | status = rtems_interrupt_catch( Service_routine, 3, NULL ); |
---|
| 49 | fatal_directive_status( |
---|
| 50 | status, |
---|
| 51 | RTEMS_INVALID_ADDRESS, |
---|
| 52 | "rtems_interrupt_catch with invalid old isr pointer" |
---|
| 53 | ); |
---|
| 54 | puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" ); |
---|
[ac7d5ef0] | 55 | |
---|
| 56 | status = rtems_signal_send( 100, RTEMS_SIGNAL_1 ); |
---|
| 57 | fatal_directive_status( |
---|
| 58 | status, |
---|
| 59 | RTEMS_INVALID_ID, |
---|
| 60 | "rtems_signal_send with illegal id" |
---|
| 61 | ); |
---|
| 62 | puts( "TA1 - rtems_signal_send - RTEMS_INVALID_ID" ); |
---|
| 63 | |
---|
| 64 | status = rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_16 ); |
---|
| 65 | fatal_directive_status( |
---|
| 66 | status, |
---|
| 67 | RTEMS_NOT_DEFINED, |
---|
| 68 | "rtems_signal_send with no handler" |
---|
| 69 | ); |
---|
| 70 | puts( "TA1 - rtems_signal_send - RTEMS_NOT_DEFINED" ); |
---|
| 71 | |
---|
| 72 | status = rtems_port_create( |
---|
| 73 | 0, |
---|
| 74 | Internal_port_area, |
---|
| 75 | External_port_area, |
---|
| 76 | sizeof( Internal_port_area ), |
---|
| 77 | &Junk_id |
---|
| 78 | ); |
---|
| 79 | fatal_directive_status( |
---|
| 80 | status, |
---|
| 81 | RTEMS_INVALID_NAME, |
---|
| 82 | "rtems_port_create with illegal name" |
---|
| 83 | ); |
---|
| 84 | puts( "TA1 - rtems_port_create - RTEMS_INVALID_NAME" ); |
---|
| 85 | |
---|
| 86 | status = rtems_port_create( |
---|
| 87 | Port_name[ 1 ], |
---|
| 88 | &((char *)Internal_port_area)[ 1 ], |
---|
| 89 | External_port_area, |
---|
| 90 | sizeof( Internal_port_area ), |
---|
| 91 | &Junk_id |
---|
| 92 | ); |
---|
| 93 | fatal_directive_status( |
---|
| 94 | status, |
---|
| 95 | RTEMS_INVALID_ADDRESS, |
---|
| 96 | "rtems_port_create with illegal address" |
---|
| 97 | ); |
---|
| 98 | puts( "TA1 - rtems_port_create - RTEMS_INVALID_ADDRESS" ); |
---|
| 99 | |
---|
| 100 | status = rtems_port_create( |
---|
| 101 | Port_name[ 1 ], |
---|
| 102 | Internal_port_area, |
---|
| 103 | External_port_area, |
---|
| 104 | sizeof( Internal_port_area ), |
---|
| 105 | &Junk_id |
---|
| 106 | ); |
---|
| 107 | fatal_directive_status( |
---|
| 108 | status, |
---|
| 109 | RTEMS_TOO_MANY, |
---|
| 110 | "rtems_port_create of too many" |
---|
| 111 | ); |
---|
| 112 | puts( "TA1 - rtems_port_create - RTEMS_TOO_MANY" ); |
---|
| 113 | |
---|
| 114 | status = rtems_port_delete( 0 ); |
---|
| 115 | fatal_directive_status( |
---|
| 116 | status, |
---|
| 117 | RTEMS_INVALID_ID, |
---|
| 118 | "rtems_port_delete with illegal id" |
---|
| 119 | ); |
---|
| 120 | puts( "TA1 - rtems_port_delete - RTEMS_INVALID_ID" ); |
---|
| 121 | |
---|
| 122 | status = rtems_port_ident( 0, &Junk_id ); |
---|
| 123 | fatal_directive_status( |
---|
| 124 | status, |
---|
| 125 | RTEMS_INVALID_NAME, |
---|
| 126 | "rtems_port_ident with illegal name" |
---|
| 127 | ); |
---|
| 128 | puts( "TA1 - rtems_port_ident - RTEMS_INVALID_NAME" ); |
---|
| 129 | |
---|
| 130 | status = rtems_port_external_to_internal( |
---|
| 131 | 100, |
---|
| 132 | Internal_port_area, |
---|
| 133 | &converted |
---|
| 134 | ); |
---|
| 135 | fatal_directive_status( |
---|
| 136 | status, |
---|
| 137 | RTEMS_INVALID_ID, |
---|
| 138 | "rtems_port_external_to_internal with illegal id" |
---|
| 139 | ); |
---|
| 140 | puts( "TA1 - rtems_port_external_to_internal - RTEMS_INVALID_ID" ); |
---|
| 141 | status = rtems_port_internal_to_external( |
---|
| 142 | 100, |
---|
| 143 | Internal_port_area, |
---|
| 144 | &converted |
---|
| 145 | ); |
---|
| 146 | fatal_directive_status( |
---|
| 147 | status, |
---|
| 148 | RTEMS_INVALID_ID, |
---|
| 149 | "rtems_port_internal_to_external with illegal id" |
---|
| 150 | ); |
---|
| 151 | puts( "TA1 - rtems_port_internal_to_external - RTEMS_INVALID_ID" ); |
---|
| 152 | } |
---|