1 | /* Screen4 |
---|
2 | * |
---|
3 | * This routine generates error screen 4 for test 9. |
---|
4 | * |
---|
5 | * Input parameters: NONE |
---|
6 | * |
---|
7 | * Output parameters: NONE |
---|
8 | * |
---|
9 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * All rights assigned to U.S. Government, 1994. |
---|
12 | * |
---|
13 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
14 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
15 | * notice must appear in all copies of this file and its derivatives. |
---|
16 | * |
---|
17 | * $Id$ |
---|
18 | */ |
---|
19 | |
---|
20 | #include "system.h" |
---|
21 | |
---|
22 | void Screen4() |
---|
23 | { |
---|
24 | rtems_event_set event_out; |
---|
25 | rtems_time_of_day time; |
---|
26 | rtems_status_code status; |
---|
27 | |
---|
28 | status = rtems_event_receive( |
---|
29 | RTEMS_EVENT_16, |
---|
30 | RTEMS_NO_WAIT, |
---|
31 | RTEMS_NO_TIMEOUT, |
---|
32 | &event_out |
---|
33 | ); |
---|
34 | fatal_directive_status( |
---|
35 | status, |
---|
36 | RTEMS_UNSATISFIED, |
---|
37 | "rtems_event_receive unsatisfied (ALL)" |
---|
38 | ); |
---|
39 | puts( "TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( all conditions )" ); |
---|
40 | |
---|
41 | status = rtems_event_receive( |
---|
42 | RTEMS_EVENT_16, |
---|
43 | RTEMS_EVENT_ANY | RTEMS_NO_WAIT, |
---|
44 | RTEMS_NO_TIMEOUT, |
---|
45 | &event_out |
---|
46 | ); |
---|
47 | fatal_directive_status( |
---|
48 | status, |
---|
49 | RTEMS_UNSATISFIED, |
---|
50 | "rtems_event_receive unsatisfied (ANY)" |
---|
51 | ); |
---|
52 | puts( "TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( any condition )" ); |
---|
53 | |
---|
54 | puts( "TA1 - rtems_event_receive - timeout in 3 seconds" ); |
---|
55 | status = rtems_event_receive( |
---|
56 | RTEMS_EVENT_16, |
---|
57 | RTEMS_DEFAULT_OPTIONS, |
---|
58 | 3 * TICKS_PER_SECOND, |
---|
59 | &event_out |
---|
60 | ); |
---|
61 | fatal_directive_status( |
---|
62 | status, |
---|
63 | RTEMS_TIMEOUT, |
---|
64 | "rtems_event_receive" |
---|
65 | ); |
---|
66 | puts( "TA1 - rtems_event_receive - woke up with RTEMS_TIMEOUT" ); |
---|
67 | |
---|
68 | status = rtems_event_send( 100, RTEMS_EVENT_16 ); |
---|
69 | fatal_directive_status( |
---|
70 | status, |
---|
71 | RTEMS_INVALID_ID, |
---|
72 | "rtems_event_send with illegal id" |
---|
73 | ); |
---|
74 | puts( "TA1 - rtems_event_send - RTEMS_INVALID_ID" ); |
---|
75 | |
---|
76 | puts( "TA1 - rtems_task_wake_after - sleep 1 second - RTEMS_SUCCESSFUL" ); |
---|
77 | status = rtems_task_wake_after( TICKS_PER_SECOND ); |
---|
78 | directive_failed( status, "rtems_task_wake_after" ); |
---|
79 | |
---|
80 | build_time( &time, 2, 5, 1988, 8, 30, 45, 0 ); |
---|
81 | print_time( "TA1 - rtems_clock_set - ", &time, "" ); |
---|
82 | status = rtems_clock_set( &time ); |
---|
83 | directive_failed( status, "rtems_clock_set" ); |
---|
84 | puts( " - RTEMS_SUCCESSFUL" ); |
---|
85 | } |
---|