summaryrefslogtreecommitdiffstats
path: root/spec/if/rtems/scheduler/get-processor.yml
blob: 52168a03cd1a55ad3d0d919a55966269d8549df9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
brief: |
  Returns the index of the current processor.
copyrights:
- Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de)
definition:
  default: ${/if/impl/smp/get-current-processor:/name}()
  variants: []
description: |
  In uniprocessor configurations, this macro evaluates to a compile time
  constant of zero.

  In SMP configurations, an architecture-specific method is used to obtain the
  index of the current processor in the system.  The set of processor indices
  is the range of integers starting with zero up to
  ${get-processor-maximum:/name} minus one.
enabled-by: true
interface-type: macro
links:
- role: interface-placement
  uid: ../tasks/header
- role: interface-ingroup
  uid: ../tasks/group
name: rtems_scheduler_get_processor
notes: |
  Outside of sections with disabled thread dispatching the current processor
  index may change after every instruction since the thread may migrate from
  one processor to another.  Sections with disabled interrupts are sections
  with thread dispatching disabled.
params: []
return:
  return: |
    The index of the current processor is returned.
  return-values: []
type: interface