source: rtems/testsuites/psxtests/psx10/task2.c @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*  Task_2
2 *
3 *  This routine serves as a test task.
4 *
5 *  Input parameters:
6 *    argument - task argument
7 *
8 *  Output parameters:  NONE
9 *
10 *  COPYRIGHT (c) 1989-1998.
11 *  On-Line Applications Research Corporation (OAR).
12 *  Copyright assigned to U.S. Government, 1994.
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.OARcorp.com/rtems/license.html.
17 *
18 *  $Id$
19 */
20
21#include "system.h"
22
23void *Task_2(
24  void *argument
25)
26{
27  int  status;
28
29  Task_id = pthread_self();
30  printf( "Task_2: ID is 0x%08x\n", Task_id );
31
32  status = pthread_mutex_lock( &Mutex_id );
33  assert( !status );
34
35  puts( "Task_2: pthread_cond_wait" );
36  status = pthread_cond_wait( &Cond1_id, &Mutex_id );
37  assert( !status );
38
39  puts( "Task_2: back from pthread_cond_wait release mutex" );
40  status = pthread_mutex_unlock( &Mutex_id );
41  assert( !status );
42
43  puts( "Task_2: task exit" );
44  pthread_exit( NULL );
45
46  return NULL; /* just so the compiler thinks we returned something */
47}
Note: See TracBrowser for help on using the repository browser.