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

4.115
Last change on this file since d4dc7c8 was d4dc7c8, checked in by Jennifer Averett <Jennifer.Averett@…>, on 05/26/11 at 18:07:07

2011-05-26 Jennifer Averett <Jennifer.Averett@…>

PR 1796/cpukit

  • sapi/src/exshutdown.c, score/include/rtems/score/percpu.h, score/include/rtems/score/smp.h, score/src/smp.c, score/src/threaddispatch.c, score/src/threadhandler.c: Added SMP interprocess communications.
  • Property mode set to 100644
File size: 2.9 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 Other Cores to Perform First Context Switch
91 *
92 *  Send message to other cores requesting them to perform
93 *  their first context switch operation.
94 */
95void _SMP_Request_other_cores_to_perform_first_context_switch(void);
96
97/**
98 *  @brief Request Dispatch on Other Cores
99 *
100 *  Send message to other cores requesting them to perform
101 *  a thread dispatch operation.
102 */
103void _SMP_Request_other_cores_to_dispatch(void);
104
105/**
106 *  @Brief Request Other Cores to Shutdown
107 *
108 *  Send message to other cores requesting them to shutdown.
109 */
110void _SMP_Request_other_cores_to_shutdown(void);
111
112#endif
113
114#ifdef __cplusplus
115}
116#endif
117
118#endif
119#endif
120/* end of include file */
Note: See TracBrowser for help on using the repository browser.