4.115
Last change
on this file since d01badc was
d01badc,
checked in by Joel Sherrill <joel.sherrill@…>, on 06/29/11 at 17:38:53
|
2011-06-29 Joel Sherrill <joel.sherrill@…>
- smp01/smp01.doc, smp02/smp02.doc, smp03/smp03.doc, smp04/smp04.doc,
smp05/smp05.doc, smp07/smp07.doc, smp08/smp08.doc, smp08/system.h,
smp08/tasks.c: Update copyright.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2011. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #ifdef HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include "system.h" |
---|
17 | |
---|
18 | rtems_task Test_task( |
---|
19 | rtems_task_argument unused |
---|
20 | ) |
---|
21 | { |
---|
22 | rtems_id tid; |
---|
23 | rtems_time_of_day time; |
---|
24 | uint32_t task_index; |
---|
25 | rtems_status_code status; |
---|
26 | int cpu_num; |
---|
27 | char name[5]; |
---|
28 | char *p; |
---|
29 | |
---|
30 | /* Get the task name */ |
---|
31 | p = rtems_object_get_name( RTEMS_SELF, 5, name ); |
---|
32 | rtems_test_assert( p != NULL ); |
---|
33 | |
---|
34 | status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); |
---|
35 | task_index = task_number( tid ); |
---|
36 | for ( ; ; ) { |
---|
37 | |
---|
38 | /* Get the CPU Number */ |
---|
39 | cpu_num = bsp_smp_processor_id(); |
---|
40 | |
---|
41 | status = rtems_clock_get_tod( &time ); |
---|
42 | if ( time.second >= 35 ) { |
---|
43 | locked_printf( "*** END OF SMP08 TEST ***" ); |
---|
44 | rtems_test_exit( 0 ); |
---|
45 | } |
---|
46 | |
---|
47 | PrintTaskInfo( p, &time ); |
---|
48 | status = rtems_task_wake_after( |
---|
49 | task_index * 5 * rtems_clock_get_ticks_per_second() ); |
---|
50 | } |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.