Line | |
---|
1 | /* |
---|
2 | * RTEMS SMP Support for Single Core |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-2013. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.rtems.com/license/LICENSE. |
---|
10 | */ |
---|
11 | |
---|
12 | #include <rtems.h> |
---|
13 | #include <rtems/bspIo.h> |
---|
14 | #include <rtems/bspsmp.h> |
---|
15 | #include <stdlib.h> |
---|
16 | |
---|
17 | |
---|
18 | void bsp_smp_secondary_cpu_initialize(int cpu) |
---|
19 | { |
---|
20 | } |
---|
21 | |
---|
22 | int bsp_smp_processor_id(void) |
---|
23 | { |
---|
24 | return 0; |
---|
25 | } |
---|
26 | |
---|
27 | int bsp_smp_initialize( |
---|
28 | int maximum |
---|
29 | ) |
---|
30 | { |
---|
31 | /* return the number of CPUs */ |
---|
32 | return maximum; |
---|
33 | } |
---|
34 | |
---|
35 | void bsp_smp_broadcast_interrupt(void) |
---|
36 | { |
---|
37 | } |
---|
38 | |
---|
39 | void bsp_smp_broadcast_message( |
---|
40 | uint32_t message |
---|
41 | ) |
---|
42 | { |
---|
43 | } |
---|
44 | |
---|
45 | void bsp_smp_interrupt_cpu( |
---|
46 | int cpu |
---|
47 | ) |
---|
48 | { |
---|
49 | } |
---|
50 | |
---|
51 | void bsp_smp_delay( int max ) |
---|
52 | { |
---|
53 | } |
---|
54 | |
---|
55 | void bsp_smp_wait_for( |
---|
56 | volatile unsigned int *address, |
---|
57 | unsigned int desired, |
---|
58 | int maximum_usecs |
---|
59 | ) |
---|
60 | { |
---|
61 | int iterations; |
---|
62 | volatile int i; |
---|
63 | volatile unsigned int *p = address; |
---|
64 | |
---|
65 | for (iterations=0 ; iterations < maximum_usecs ; iterations++ ) { |
---|
66 | *p = desired; |
---|
67 | /* XXX hack to make simulator happy */ |
---|
68 | } |
---|
69 | } |
---|
70 | |
---|
Note: See
TracBrowser
for help on using the repository browser.