source: rtems/cpukit/score/include/rtems/score/smp.h @ a15eaaf

4.115
Last change on this file since a15eaaf was a15eaaf, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 10, 2013 at 7:20:34 PM

cpukit: Doxygen group fixes and many warnings addressed

The output of the modules.html is much improved. Most
filesystem and POSIX API related groups are properly nested.
Some formatting issues were addressed as were multiple
inconsistencies.

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