source: rtems/c/src/tests/psxtests/psx01/task.c @ 893103c

4.104.114.84.95
Last change on this file since 893103c was 893103c, checked in by Joel Sherrill <joel.sherrill@…>, on 06/10/96 at 20:49:08

moved the time macros to pmacros.h.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*  Task_1_through_3
2 *
3 *  This routine serves as a test task.  It verifies the basic task
4 *  switching capabilities of the executive.
5 *
6 *  Input parameters:
7 *    argument - task argument
8 *
9 *  Output parameters:  NONE
10 *
11 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
12 *  On-Line Applications Research Corporation (OAR).
13 *  All rights assigned to U.S. Government, 1994.
14 *
15 *  This material may be reproduced by or for the U.S. Government pursuant
16 *  to the copyright license under the clause at DFARS 252.227-7013.  This
17 *  notice must appear in all copies of this file and its derivatives.
18 *
19 *  $Id$
20 */
21
22#include "system.h"
23
24void *Task_1_through_3(
25  void *argument
26)
27{
28  int status;
29
30  /* XXX temporary */
31
32  /* get id of this thread */
33
34  Task_id = pthread_self();
35  printf( "Task's ID is 0x%08x\n", Task_id );
36
37  status = pthread_equal( Task_id, Task_id );
38  if ( status )
39    puts( "pthread_equal match case passed" );
40  assert( status );
41
42  status = pthread_equal( Init_id, Task_id );
43  if ( !status )
44    puts( "pthread_equal different case passed" );
45  assert( !status );
46
47  puts( "*** END OF POSIX TEST 1 ***" );
48  exit( 0 );
49
50  return NULL; /* just so the compiler thinks we returned something */
51}
Note: See TracBrowser for help on using the repository browser.