4.115
Last change
on this file since cb5eaddf was
cb5eaddf,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/10/14 at 09:02:52
|
rtems: Rename rtems_smp_get_current_processor()
Rename rtems_smp_get_current_processor() in
rtems_get_current_processor(). Make rtems_get_current_processor() a
function in uni-processor configurations to enable ABI compatibility
with SMP configurations.
|
-
Property mode set to
100644
|
File size:
977 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.org/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_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.