source: rtems/testsuites/sptests/sp17/task1.c @ 8fbdf07

4.104.114.84.95
Last change on this file since 8fbdf07 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 17, 1999 at 5:51:34 PM

Updated copyright notice.

  • Property mode set to 100644
File size: 1.2 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-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$
22 */
23
24#include "system.h"
25
26rtems_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}
Note: See TracBrowser for help on using the repository browser.