RTEMS  5.0.0
smp.h
Go to the documentation of this file.
1 
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
24 extern "C" {
25 #endif
26 
37 #if defined( RTEMS_SMP )
38  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  static inline uint32_t _SMP_Get_current_processor( void )
50  {
51  return _CPU_SMP_Get_current_processor();
52  }
53 #else
54  #define _SMP_Get_current_processor() UINT32_C(0)
55 #endif
56 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif
64 /* end of include file */