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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [tests/] [sptests/] [sp09/] [screen04.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
/*  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-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: screen04.c,v 1.2 2001-09-27 12:02:31 chris Exp $
17
 */
18
 
19
#include "system.h"
20
 
21
void Screen4()
22
{
23
  rtems_event_set   event_out;
24
  rtems_time_of_day time;
25
  rtems_status_code status;
26
 
27
  status = rtems_event_receive(
28
    RTEMS_EVENT_16,
29
    RTEMS_NO_WAIT,
30
    RTEMS_NO_TIMEOUT,
31
    &event_out
32
  );
33
  fatal_directive_status(
34
    status,
35
    RTEMS_UNSATISFIED,
36
    "rtems_event_receive unsatisfied (ALL)"
37
  );
38
  puts( "TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( all conditions )" );
39
 
40
  status = rtems_event_receive(
41
    RTEMS_EVENT_16,
42
    RTEMS_EVENT_ANY | RTEMS_NO_WAIT,
43
    RTEMS_NO_TIMEOUT,
44
    &event_out
45
  );
46
  fatal_directive_status(
47
    status,
48
    RTEMS_UNSATISFIED,
49
    "rtems_event_receive unsatisfied (ANY)"
50
  );
51
  puts( "TA1 - rtems_event_receive - RTEMS_UNSATISFIED ( any condition )" );
52
 
53
  puts( "TA1 - rtems_event_receive - timeout in 3 seconds" );
54
  status = rtems_event_receive(
55
    RTEMS_EVENT_16,
56
    RTEMS_DEFAULT_OPTIONS,
57
    3 * TICKS_PER_SECOND,
58
    &event_out
59
  );
60
  fatal_directive_status(
61
    status,
62
    RTEMS_TIMEOUT,
63
    "rtems_event_receive"
64
  );
65
  puts( "TA1 - rtems_event_receive - woke up with RTEMS_TIMEOUT" );
66
 
67
  status = rtems_event_send( 100, RTEMS_EVENT_16 );
68
  fatal_directive_status(
69
    status,
70
    RTEMS_INVALID_ID,
71
    "rtems_event_send with illegal id"
72
  );
73
  puts( "TA1 - rtems_event_send - RTEMS_INVALID_ID" );
74
 
75
  puts( "TA1 - rtems_task_wake_after - sleep 1 second - RTEMS_SUCCESSFUL" );
76
  status = rtems_task_wake_after( TICKS_PER_SECOND );
77
  directive_failed( status, "rtems_task_wake_after" );
78
 
79
  build_time( &time, 2, 5, 1988, 8, 30, 45, 0 );
80
  print_time( "TA1 - rtems_clock_set - ", &time, "" );
81
  status = rtems_clock_set( &time );
82
  directive_failed( status, "rtems_clock_set" );
83
  puts( " - RTEMS_SUCCESSFUL" );
84
}

powered by: WebSVN 2.1.0

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