source: rtems/cpukit/score/include/rtems/score/smp.h @ 6ca4f6a

4.115
Last change on this file since 6ca4f6a was 6ca4f6a, checked in by Sebastian Huber <sebastian.huber@…>, on 02/17/14 at 13:56:51

score: Add and use <rtems/score/smpimpl.h>

Collect SMP implementation specific parts in the
<rtems/score/smpimpl.h> header file.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreSMP
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.com/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 ScoreSMP SMP Support
29 *
30 * @ingroup Score
31 *
32 * This defines the interface of the SuperCore SMP support.
33 *
34 * @{
35 */
36
37#if defined( RTEMS_SMP )
38  SCORE_EXTERN uint32_t _SMP_Processor_count;
39
40  static inline uint32_t _SMP_Get_processor_count( void )
41  {
42    return _SMP_Processor_count;
43  }
44#else
45  #define _SMP_Get_processor_count() UINT32_C(1)
46#endif
47
48#if defined( RTEMS_SMP )
49  RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
50    _SMP_Get_current_processor( void )
51  {
52    return _CPU_SMP_Get_current_processor();
53  }
54#else
55  #define _SMP_Get_current_processor() UINT32_C(0)
56#endif
57
58/** @} */
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif
65/* end of include file */
Note: See TracBrowser for help on using the repository browser.