1 | /** |
---|
2 | * @file rtems/rtems/smp.h |
---|
3 | * |
---|
4 | * @defgroup ClassicSMP Classic API SMP Services |
---|
5 | * |
---|
6 | * @ingroup ClassicRTEMS |
---|
7 | * @brief SMP information and services. |
---|
8 | * |
---|
9 | * Most of the SMP interface is hidden from the application |
---|
10 | * and exists between the BSP and RTEMS. |
---|
11 | */ |
---|
12 | |
---|
13 | /* COPYRIGHT (c) 1989-2011. |
---|
14 | * On-Line Applications Research Corporation (OAR). |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.com/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef _RTEMS_RTEMS_SMP_H |
---|
22 | #define _RTEMS_RTEMS_SMP_H |
---|
23 | |
---|
24 | #ifdef __cplusplus |
---|
25 | extern "C" { |
---|
26 | #endif |
---|
27 | |
---|
28 | #include <rtems/score/smp.h> |
---|
29 | |
---|
30 | /** |
---|
31 | * @defgroup ClassicSMP Classic API SMP Services |
---|
32 | * |
---|
33 | * @ingroup ClassicRTEMS |
---|
34 | * |
---|
35 | * This encapsulates functionality which is useful for SMP applications. |
---|
36 | */ |
---|
37 | /**@{*/ |
---|
38 | |
---|
39 | /** |
---|
40 | * @brief Obtain Number of Cores in System |
---|
41 | * |
---|
42 | * This method returns the number of CPU cores that are currently in |
---|
43 | * the system. This will always be less than or equal to the number |
---|
44 | * of maximum number of cores which were configured. |
---|
45 | * |
---|
46 | * @retval This method returns the number of cores in this system. |
---|
47 | */ |
---|
48 | #define rtems_smp_get_number_of_processors() \ |
---|
49 | (_SMP_Processor_count) |
---|
50 | |
---|
51 | /** |
---|
52 | * @brief Obtain Current Core Number |
---|
53 | * |
---|
54 | * This method returns the id of the current CPU core. |
---|
55 | * |
---|
56 | * @retval This method returns the id of the current CPU core. |
---|
57 | */ |
---|
58 | #define rtems_smp_get_current_processor() \ |
---|
59 | bsp_smp_processor_id() |
---|
60 | |
---|
61 | /**@}*/ |
---|
62 | |
---|
63 | #ifdef __cplusplus |
---|
64 | } |
---|
65 | #endif |
---|
66 | |
---|
67 | #endif |
---|
68 | /* end of include file */ |
---|