4.104.115
Last change
on this file since fa342bc7 was
fa342bc7,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/10/09 at 14:54:31
|
2009-08-10 Joel Sherrill <joel.sherrill@…>
- ticker/tasks.c: Convert calls to legacy routine rtems_clock_get(
RTEMS_CLOCK_GET_TOD, ..) to rtems_clock_get_tod(..).
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* Test_task |
---|
2 | * |
---|
3 | * This routine serves as a test task. It verifies the basic task |
---|
4 | * switching capabilities of the executive. |
---|
5 | * |
---|
6 | * Input parameters: NONE |
---|
7 | * |
---|
8 | * Output parameters: NONE |
---|
9 | * |
---|
10 | * COPYRIGHT (c) 1989-1999. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.com/license/LICENSE. |
---|
16 | * |
---|
17 | * $Id$ |
---|
18 | */ |
---|
19 | |
---|
20 | #include "system.h" |
---|
21 | |
---|
22 | rtems_task Test_task( |
---|
23 | rtems_task_argument unused |
---|
24 | ) |
---|
25 | { |
---|
26 | rtems_id tid; |
---|
27 | rtems_time_of_day time; |
---|
28 | uint32_t task_index; |
---|
29 | rtems_status_code status; |
---|
30 | |
---|
31 | status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); |
---|
32 | task_index = task_number( tid ); |
---|
33 | for ( ; ; ) { |
---|
34 | status = rtems_clock_get_tod( &time ); |
---|
35 | if ( time.second >= 35 ) { |
---|
36 | puts( "*** END OF CLOCK TICK TEST ***" ); |
---|
37 | rtems_test_exit( 0 ); |
---|
38 | } |
---|
39 | put_name( Task_name[ task_index ], FALSE ); |
---|
40 | print_time( " - rtems_clock_get_tod - ", &time, "\n" ); |
---|
41 | status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second() ); |
---|
42 | } |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.