source: rtems/c/src/tests/psxtests/psx05/task2.c @ 13642cbc

4.104.114.84.95
Last change on this file since 13642cbc was 79f189e, checked in by Joel Sherrill <joel.sherrill@…>, on 08/08/96 at 21:58:26

split test into multiple tasks.

  • Property mode set to 100644
File size: 1.1 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, 1990, 1991, 1992, 1993, 1994.
11 *  On-Line Applications Research Corporation (OAR).
12 *  All rights assigned to U.S. Government, 1994.
13 *
14 *  This material may be reproduced by or for the U.S. Government pursuant
15 *  to the copyright license under the clause at DFARS 252.227-7013.  This
16 *  notice must appear in all copies of this file and its derivatives.
17 *
18 *  $Id$
19 */
20
21#include "system.h"
22#include <errno.h>
23
24void *Task_2(
25  void *argument
26)
27{
28  int status;
29
30  printf( "Task 2: pthread_mutex_lock unavailable (inherit case)\n" );
31  status = pthread_mutex_lock( &Mutex2_id );
32  printf( "Task 2: mutex acquired\n" );
33  assert( !status );
34
35     /* switch to init */
36
37  printf( "Task 2: unlock Mutex 2\n" );
38  status = pthread_mutex_unlock( &Mutex2_id );
39  assert( !status );
40
41  printf( "Task 2: exit\n" );
42  pthread_exit( NULL );
43
44     /* switch to Init */
45
46  return NULL; /* just so the compiler thinks we returned something */
47}
Note: See TracBrowser for help on using the repository browser.