4.115
Last change
on this file since 39e51758 was
39e51758,
checked in by Sebastian Huber <sebastian.huber@…>, on 06/14/13 at 12:00:38
|
smp: Add and use _CPU_SMP_Get_current_processor()
Add and use _SMP_Get_current_processor() and
rtems_smp_get_current_processor().
Delete bsp_smp_interrupt_cpu().
Change type of current processor index from int to uint32_t to match
_SMP_Processor_count type.
|
-
Property mode set to
100644
|
File size:
981 bytes
|
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 | |
---|
10 | #ifdef HAVE_CONFIG_H |
---|
11 | #include "config.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | #include "system.h" |
---|
15 | |
---|
16 | #include <inttypes.h> |
---|
17 | |
---|
18 | rtems_task Test_task( |
---|
19 | rtems_task_argument task_index |
---|
20 | ) |
---|
21 | { |
---|
22 | uint32_t cpu_num; |
---|
23 | char name[5]; |
---|
24 | char *p; |
---|
25 | |
---|
26 | /* Get the task name */ |
---|
27 | p = rtems_object_get_name( RTEMS_SELF, 5, name ); |
---|
28 | rtems_test_assert( p != NULL ); |
---|
29 | |
---|
30 | /* Get the CPU Number */ |
---|
31 | cpu_num = rtems_smp_get_current_processor(); |
---|
32 | |
---|
33 | /* Print that the task is up and running. */ |
---|
34 | Loop(); |
---|
35 | locked_printf(" CPU %" PRIu32 " running Task %s\n", cpu_num, name); |
---|
36 | |
---|
37 | /* Set the flag that the task is up and running */ |
---|
38 | TaskRan[cpu_num] = true; |
---|
39 | |
---|
40 | |
---|
41 | /* Drop into a loop which will keep this task on |
---|
42 | * running on the cpu. |
---|
43 | */ |
---|
44 | while(1); |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.