source: rtems/cpukit/score/include/rtems/score/smp.h @ 27f09f17

4.115
Last change on this file since 27f09f17 was dacdda30, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/24/11 at 02:44:58

Remove white-spaces.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/**
2 *  @file  rtems/score/smp.h
3 *
4 *  This include file defines the interface to the SuperCore
5 *  SMP support that is used internally to RTEMS.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2011.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_SCORE_SMP_H
20#define _RTEMS_SCORE_SMP_H
21
22#if defined (RTEMS_SMP)
23#include <rtems/score/percpu.h>
24
25/**
26 *  @defgroup SuperCore SMP Support
27 *
28 *  This defines the interface of the SuperCore support
29 *  code for SMP support.
30 */
31
32/**@{*/
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/**
39 *  This defines the bit which indicates the interprocessor interrupt
40 *  has been requested so that RTEMS will reschedule on this CPU
41 *  because the currently executing thread needs to be switched out.
42 */
43#define RTEMS_BSP_SMP_CONTEXT_SWITCH_NECESSARY  0x01
44
45/**
46 *  This defines the bit which indicates the interprocessor interrupt
47 *  has been requested so that RTEMS will reschedule on this CPU
48 *  because the currently executing thread has been sent a signal.
49 */
50#define RTEMS_BSP_SMP_SIGNAL_TO_SELF            0x02
51
52/**
53 *  This defines the bit which indicates the interprocessor interrupt
54 *  has been requested so that this CPU will be shutdown.  This is done
55 *  as part of rtems_executive_shutdown().
56 */
57#define RTEMS_BSP_SMP_SHUTDOWN                  0x04
58
59/**
60 *  This defines the bit which indicates the interprocessor interrupt
61 *  has been requested that the receiving CPU needs to perform a context
62 *  switch to the first task.
63 */
64#define RTEMS_BSP_SMP_FIRST_TASK                0x08
65
66#ifndef ASM
67/**
68 *  @brief Number of CPUs in SMP System
69 *
70 *  This variable is set during the SMP initialization sequence to
71 *  indicate the number of CPUs in this system.
72 */
73SCORE_EXTERN uint32_t _SMP_Processor_count;
74
75/**
76 *  @brief Make Request of Others CPUs
77 *
78 *  This method is invoked by RTEMS when it needs to make a request
79 *  of the other CPUs.  It should be implemented using some type of
80 *  interprocessor interrupt. CPUs not including the originating
81 *  CPU should receive the message.
82 *
83 *  @param [in] message is message to send
84 */
85void _SMP_Broadcast_message(
86  uint32_t  message
87);
88
89/**
90 *  @brief Request Dispatch on Other Cores
91 *
92 *  Send message to other cores requesting them to perform
93 *  a thread dispatch operation.
94 */
95void _SMP_Request_other_cores_to_dispatch(void);
96
97/**
98 *  @Brief Request Other Cores to Shutdown
99 *
100 *  Send message to other cores requesting them to shutdown.
101 */
102void _SMP_Request_other_cores_to_shutdown(void);
103
104#endif
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif
111#endif
112/* end of include file */
Note: See TracBrowser for help on using the repository browser.