4.115
Last change
on this file since c499856 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.0 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-2009. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
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.rtems.org/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifdef HAVE_CONFIG_H |
---|
20 | #include "config.h" |
---|
21 | #endif |
---|
22 | |
---|
23 | #include "system.h" |
---|
24 | #include <signal.h> |
---|
25 | |
---|
26 | void *Task_1_through_3( |
---|
27 | void *argument |
---|
28 | ) |
---|
29 | { |
---|
30 | unsigned int seconds; |
---|
31 | int i; |
---|
32 | int status; |
---|
33 | |
---|
34 | for ( i=0 ; i<5 ; i++ ) { |
---|
35 | print_current_time( "Task1: ", "" ); |
---|
36 | status = pthread_kill( Init_id, SIGUSR1 ); |
---|
37 | rtems_test_assert( !status ); |
---|
38 | |
---|
39 | seconds = sleep( 1 ); |
---|
40 | rtems_test_assert( !seconds ); |
---|
41 | } |
---|
42 | puts( "*** END OF POSIX TEST 2 ***" ); |
---|
43 | rtems_test_exit( 0 ); |
---|
44 | |
---|
45 | return NULL; /* just so the compiler thinks we returned something */ |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.