summaryrefslogtreecommitdiffstats
path: root/doc/user/smp.t
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/smp.t')
-rw-r--r--doc/user/smp.t39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/user/smp.t b/doc/user/smp.t
index d16df0e7d6..37c792f400 100644
--- a/doc/user/smp.t
+++ b/doc/user/smp.t
@@ -15,6 +15,7 @@ The application level services currently provided are:
@itemize @bullet
@item @code{rtems_get_processor_count} - Get processor count
+@item @code{rtems_get_current_processor} - Get current processor index
@item @code{rtems_task_get_affinity} - Obtain Task Affinity
@item @code{rtems_task_set_affinity} - Set Task Affinity
@end itemize
@@ -258,6 +259,44 @@ maximum count of application configured processors.
None.
@c
+@c rtems_get_current_processor
+@c
+@page
+@subsection GET_CURRENT_PROCESSOR - Get current processor index
+
+@subheading CALLING SEQUENCE:
+
+@ifset is-C
+@example
+uint32_t rtems_get_current_processor(void);
+@end example
+@end ifset
+
+@ifset is-Ada
+@end ifset
+
+@subheading DIRECTIVE STATUS CODES:
+
+The index of the current processor.
+
+@subheading DESCRIPTION:
+
+On uni-processor configurations a value of zero will be returned.
+
+On 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 the processor count minus one.
+
+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.
+
+@subheading NOTES:
+
+None.
+
+@c
@c rtems_task_get_affinity
@c
@page