4.104.114.84.95
Last change
on this file since 5b08e20 was
5b08e20,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/09/96 at 16:01:50
|
changed printf's which could be puts's to puts
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /* Task_1 |
---|
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 | #include <errno.h> |
---|
24 | |
---|
25 | void *Task_1( |
---|
26 | void *argument |
---|
27 | ) |
---|
28 | { |
---|
29 | int status; |
---|
30 | rtems_unsigned32 *key_data; |
---|
31 | |
---|
32 | printf( "Task_1: Setting the key to %d\n", 1 ); |
---|
33 | status = pthread_setspecific( Key_id, &Data_array[ 1 ] ); |
---|
34 | if ( status ) |
---|
35 | printf( "status = %d\n", status ); |
---|
36 | assert( !status ); |
---|
37 | |
---|
38 | key_data = pthread_getspecific( Key_id ); |
---|
39 | printf( "Task_1: Got the key value of %d\n", |
---|
40 | (rtems_unsigned32 *)key_data - Data_array ); |
---|
41 | if ( status ) |
---|
42 | printf( "status = %d\n", status ); |
---|
43 | assert( !status ); |
---|
44 | |
---|
45 | puts( "Task_1: exitting" ); |
---|
46 | pthread_exit( NULL ); |
---|
47 | |
---|
48 | /* switch to task 2 */ |
---|
49 | |
---|
50 | return NULL; /* just so the compiler thinks we returned something */ |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.