source: rtems/testsuites/sptests/sp17/task1.c @ ac7d5ef0

4.104.114.84.95
Last change on this file since ac7d5ef0 was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/11/95 at 17:39:37

Initial revision

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*  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, 1990, 1991, 1992, 1993, 1994.
15 *  On-Line Applications Research Corporation (OAR).
16 *  All rights assigned to U.S. Government, 1994.
17 *
18 *  This material may be reproduced by or for the U.S. Government pursuant
19 *  to the copyright license under the clause at DFARS 252.227-7013.  This
20 *  notice must appear in all copies of this file and its derivatives.
21 *
22 *  $Id$
23 */
24
25#include "system.h"
26
27rtems_task Task_1(
28  rtems_task_argument argument
29)
30{
31  rtems_status_code status;
32
33  puts( "TA1 - rtems_signal_catch: initializing signal catcher" );
34  status = rtems_signal_catch( Process_asr, RTEMS_NO_ASR | RTEMS_NO_PREEMPT );
35  directive_failed( status, "rtems_signal_catch" );
36
37  puts( "TA1 - Sending signal to self" );
38  status = rtems_signal_send( Task_id[ 1 ], RTEMS_SIGNAL_16 );
39  directive_failed( status, "rtems_signal_send" );
40
41  if ( Task_2_preempted == TRUE )
42    puts( "TA1 - TA2 correctly preempted me" );
43
44  puts("TA1 - Got Back!!!");
45
46  puts( "*** END OF TEST 17 ***" );
47  exit( 0 );
48}
Note: See TracBrowser for help on using the repository browser.