source: rtems-schedsim/schedsim/shell/schedsim_smpsimple/smp_stub.c @ a2aad55

Last change on this file since a2aad55 was a2aad55, checked in by Joel Sherrill <joel.sherrill@…>, on May 1, 2013 at 12:41:56 AM

Remove CVS $

  • Property mode set to 100644
File size: 1.2 KB
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
17uint32_t Schedsim_Current_cpu;
18
19void bsp_smp_secondary_cpu_initialize(int cpu)
20{
21  Schedsim_Current_cpu = 0;
22}
23
24int bsp_smp_processor_id(void)
25{
26  return Schedsim_Current_cpu;
27}
28
29int bsp_smp_initialize(
30  int maximum
31)
32{
33  /* return the number of CPUs */
34  return maximum;
35}
36
37void bsp_smp_broadcast_interrupt(void)
38{
39}
40
41void bsp_smp_broadcast_message(
42  uint32_t  message
43)
44{
45}
46
47void bsp_smp_interrupt_cpu(
48  int cpu
49)
50{
51}
52
53void bsp_smp_delay( int max )
54{
55}
56
57void bsp_smp_wait_for(
58  volatile unsigned int *address,
59  unsigned int           desired,
60  int                    maximum_usecs
61)
62{
63  int iterations;
64  volatile int i;
65  volatile unsigned int *p = address;
66
67  for (iterations=0 ;  iterations < maximum_usecs ; iterations++ ) {
68    *p = desired;
69    /* XXX hack to make simulator happy */
70  }
71}
72
Note: See TracBrowser for help on using the repository browser.