4.104.115
Last change
on this file since 6d1e9b8b was
cd49fdc,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/10/09 at 14:50:24
|
2009-08-10 Joel Sherrill <joel.sherrill@…>
- cpuuse/task1.c, cpuuse/tswitch.c, malloctest/task1.c,
stackchk/task1.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 | /* task1.c |
---|
2 | * |
---|
3 | * This set of three tasks do some simple task switching for about |
---|
4 | * 15 seconds and then call a routine to "blow the stack". |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1999. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #include "system.h" |
---|
17 | |
---|
18 | rtems_task Task_1_through_3( |
---|
19 | rtems_task_argument argument |
---|
20 | ) |
---|
21 | { |
---|
22 | rtems_id tid; |
---|
23 | rtems_time_of_day time; |
---|
24 | rtems_status_code status; |
---|
25 | |
---|
26 | status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); |
---|
27 | directive_failed( status, "rtems_task_ident" ); |
---|
28 | |
---|
29 | while( FOREVER ) { |
---|
30 | status = rtems_clock_get_tod( &time ); |
---|
31 | directive_failed( status, "rtems_clock_get_tod" ); |
---|
32 | |
---|
33 | if ( time.second >= 15 && tid == Task_id[ 1 ] ) { |
---|
34 | blow_stack(); |
---|
35 | } |
---|
36 | |
---|
37 | put_name( Task_name[ task_number( tid ) ], FALSE ); |
---|
38 | print_time( " - rtems_clock_get_tod - ", &time, "\n" ); |
---|
39 | |
---|
40 | status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND ); |
---|
41 | directive_failed( status, "rtems_task_wake_after" ); |
---|
42 | } |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.