source: rtems/cpukit/rtems/include/rtems/rtems/smp.h @ cb5eaddf

4.115
Last change on this file since cb5eaddf was cb5eaddf, checked in by Sebastian Huber <sebastian.huber@…>, on 04/10/14 at 09:02:52

rtems: Rename rtems_smp_get_current_processor()

Rename rtems_smp_get_current_processor() in
rtems_get_current_processor(). Make rtems_get_current_processor() a
function in uni-processor configurations to enable ABI compatibility
with SMP configurations.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicSMP
5 *
6 * @brief SMP Services 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_RTEMS_SMP_H
19#define _RTEMS_RTEMS_SMP_H
20
21#include <stdint.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup ClassicSMP SMP Services
29 *
30 * @ingroup ClassicRTEMS
31 *
32 * This encapsulates functionality which is useful for SMP applications.
33 *
34 * This API is also available on uni-processor configurations.  Here compile
35 * time constants are used whenever possible.
36 *
37 * @{
38 */
39
40/**
41 * @brief Returns the count of processors in the system.
42 *
43 * On uni-processor configurations a value of one will be returned.
44 *
45 * On SMP configurations this returns the value of a global variable set during
46 * system initialization to indicate the count of processors.  The processor
47 * count depends on the hardware and application configuration.  The value will
48 * always be less than or equal to the maximum count of application configured
49 * processors.
50 *
51 * @return The count of processors in the system.
52 */
53uint32_t rtems_get_processor_count(void);
54
55/**
56 * @brief Returns the index of the current processor.
57 *
58 * On uni-processor configurations a value of zero will be returned.
59 *
60 * On SMP configurations an architecture specific method is used to obtain the
61 * index of the current processor in the system.  The set of processor indices
62 * is the range of integers starting with zero up to the processor count minus
63 * one.
64 *
65 * Outside of sections with disabled thread dispatching the current processor
66 * index may change after every instruction since the thread may migrate from
67 * one processor to another.  Sections with disabled interrupts are sections
68 * with thread dispatching disabled.
69 *
70 * @return The index of the current processor.
71 */
72uint32_t rtems_get_current_processor(void);
73
74/** @} */
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif
81/* end of include file */
Note: See TracBrowser for help on using the repository browser.