source: rtems/testsuites/sptests/sp17/task2.c @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c 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.2 KB
Line 
1/*  Task_2
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_2(
28  rtems_task_argument argument
29)
30{
31  rtems_status_code status;
32
33  Task_2_preempted = FALSE;
34
35  puts( "TA2 - Suspending self" );
36  status = rtems_task_suspend( RTEMS_SELF );
37  directive_failed( status, "rtems_task_suspend of TA2" );
38
39  puts( "TA2 - signal_return preempted correctly" );
40
41  Task_2_preempted = TRUE;
42
43  status = rtems_task_suspend( RTEMS_SELF );
44  directive_failed( status, "rtems_task_suspend of TA2" );
45}
Note: See TracBrowser for help on using the repository browser.