4.104.114.84.95
Last change
on this file since 9e28da4 was
36197e53,
checked in by Mark Johannes <Mark.Johannes@…>, on 06/13/96 at 22:16:08
|
first successful run. Has test cases for a simple sigtimedwait() timeout,
a sigtimewait() timeout because it was pthread_kill'ed with a blocked
signal, and a sigtimedwait which is satisfied.
|
-
Property mode set to
100644
|
File size:
1.3 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 | #include <signal.h> |
---|
24 | |
---|
25 | void *Task_1( |
---|
26 | void *argument |
---|
27 | ) |
---|
28 | { |
---|
29 | int status; |
---|
30 | |
---|
31 | /* send SIGUSR2 to Init which is waiting on SIGUSR1 */ |
---|
32 | |
---|
33 | print_current_time( "Task1: ", "" ); |
---|
34 | status = pthread_kill( Init_id, SIGUSR2 ); |
---|
35 | assert( !status ); |
---|
36 | |
---|
37 | pthread_exit( NULL ); |
---|
38 | |
---|
39 | /* switch to Init */ |
---|
40 | |
---|
41 | return NULL; /* just so the compiler thinks we returned something */ |
---|
42 | } |
---|
43 | |
---|
44 | void *Task_2( |
---|
45 | void *argument |
---|
46 | ) |
---|
47 | { |
---|
48 | int status; |
---|
49 | |
---|
50 | /* send SIGUSR1 to Init which is waiting on SIGUSR1 */ |
---|
51 | |
---|
52 | print_current_time( "Task2: ", "" ); |
---|
53 | status = pthread_kill( Init_id, SIGUSR1 ); |
---|
54 | assert( !status ); |
---|
55 | |
---|
56 | pthread_exit( NULL ); |
---|
57 | |
---|
58 | /* switch to Init */ |
---|
59 | |
---|
60 | return NULL; /* just so the compiler thinks we returned something */ |
---|
61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.