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

4.104.114.84.95
Last change on this file since 15974b65 was 15974b65, checked in by Joel Sherrill <joel.sherrill@…>, on 06/04/96 at 14:32:21

added basic test cases for pthread_self and pthread_equal

  • Property mode set to 100644
File size: 1.1 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 seconds;
29  int status;
30
31  /* XXX temporary */
32
33  /* get id of this thread */
34
35  Task_id = pthread_self();
36  printf( "Task's ID is 0x%08x\n", Task_id );
37
38  status = pthread_equal( Task_id, Task_id );
39  if ( status )
40    puts( "pthread_equal match case passed" );
41  assert( status );
42
43  status = pthread_equal( Init_id, Task_id );
44  if ( !status )
45    puts( "pthread_equal different case passed" );
46  assert( !status );
47
48  puts( "*** END OF POSIX TEST 1 ***" );
49  exit( 0 );
50}
Note: See TracBrowser for help on using the repository browser.