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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [tests/] [sptests/] [sp17/] [task1.c] - Blame information for rev 583

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

Line No. Rev Author Line
1 30 unneback
/*  Task_1
2
 *
3
 *  This task initializes the signal catcher, sends the first signal
4
 *  if running on the first node, and loops while waiting for signals.
5
 *
6
 *  NOTE: The signal catcher is not reentrant and hence RTEMS_NO_ASR must
7
 *        be a part of its execution mode.
8
 *
9
 *  Input parameters:
10
 *    argument - task argument
11
 *
12
 *  Output parameters:  NONE
13
 *
14
 *  COPYRIGHT (c) 1989-1999.
15
 *  On-Line Applications Research Corporation (OAR).
16
 *
17
 *  The license and distribution terms for this file may be
18
 *  found in the file LICENSE in this distribution or at
19
 *  http://www.OARcorp.com/rtems/license.html.
20
 *
21
 *  $Id: task1.c,v 1.2 2001-09-27 12:02:33 chris Exp $
22
 */
23
 
24
#include "system.h"
25
 
26
rtems_task Task_1(
27
  rtems_task_argument argument
28
)
29
{
30
  rtems_status_code status;
31
 
32
  puts( "TA1 - rtems_signal_catch: initializing signal catcher" );
33
  status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR | RTEMS_NO_PREEMPT );
34
  directive_failed( status, "rtems_signal_catch" );
35
 
36
  puts( "TA1 - Sending signal to self" );
37
  status = rtems_signal_send( Task_id[ 1 ], RTEMS_SIGNAL_16 );
38
  directive_failed( status, "rtems_signal_send" );
39
 
40
  if ( Task_2_preempted == TRUE )
41
    puts( "TA1 - TA2 correctly preempted me" );
42
 
43
  puts("TA1 - Got Back!!!");
44
 
45
  puts( "*** END OF TEST 17 ***" );
46
  exit( 0 );
47
}

powered by: WebSVN 2.1.0

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