source: rtems/cpukit/include/rtems/score/smp.h @ 567455b6

5
Last change on this file since 567455b6 was 567455b6, checked in by Sebastian Huber <sebastian.huber@…>, on 02/14/20 at 12:57:20

config: Add _SMP_Processor_configure_maximum

Move the processor maximum configuration constant out of the
configuration table.

Update #3875.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSScoreSMP
5 *
6 * @brief SuperCore SMP Support API
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2011.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#ifndef _RTEMS_SCORE_SMP_H
19#define _RTEMS_SCORE_SMP_H
20
21#include <rtems/score/cpu.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup RTEMSScoreSMP SMP Support
29 *
30 * @ingroup RTEMSScore
31 *
32 * @brief SMP Support
33 *
34 * This defines the interface of the SuperCore SMP support.
35 *
36 * @{
37 */
38
39/**
40 * @brief The configured processor maximum.
41 *
42 * In SMP configurations, this constant is defined by the application
43 * configuration via <rtems/confdefs.h>, otherwise it is a compile-time
44 * constant with the value one.
45 */
46#if defined(RTEMS_SMP)
47  extern const uint32_t _SMP_Processor_configured_maximum;
48#else
49  #define _SMP_Processor_configured_maximum 1
50#endif
51
52#if defined( RTEMS_SMP )
53  extern uint32_t _SMP_Processor_maximum;
54
55  static inline uint32_t _SMP_Get_processor_maximum( void )
56  {
57    return _SMP_Processor_maximum;
58  }
59#else
60  #define _SMP_Get_processor_maximum() UINT32_C(1)
61#endif
62
63#if defined( RTEMS_SMP )
64  static inline uint32_t _SMP_Get_current_processor( void )
65  {
66    return _CPU_SMP_Get_current_processor();
67  }
68#else
69  #define _SMP_Get_current_processor() UINT32_C(0)
70#endif
71
72/** @} */
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
79/* end of include file */
Note: See TracBrowser for help on using the repository browser.