[rtems commit] doc: rtems_get_current_processor()

Sebastian Huber sebh at rtems.org
Thu Apr 17 06:04:19 UTC 2014


Module:    rtems
Branch:    master
Commit:    4a93980a14883349cd84b1ccc318ba36a8abe885
Changeset: http://git.rtems.org/rtems/commit/?id=4a93980a14883349cd84b1ccc318ba36a8abe885

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Apr 16 15:17:32 2014 +0200

doc: rtems_get_current_processor()

---

 doc/user/smp.t |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/doc/user/smp.t b/doc/user/smp.t
index d16df0e..37c792f 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
+ at 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
+ at c rtems_get_current_processor
+ at c
+ at page
+ at subsection GET_CURRENT_PROCESSOR - Get current processor index
+
+ at subheading CALLING SEQUENCE:
+
+ at ifset is-C
+ at example
+uint32_t rtems_get_current_processor(void);
+ at end example
+ at end ifset
+
+ at ifset is-Ada
+ at end ifset
+
+ at subheading DIRECTIVE STATUS CODES:
+
+The index of the current processor.
+
+ at 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.
+
+ at subheading NOTES:
+
+None.
+
+ at c
 @c rtems_task_get_affinity
 @c
 @page




More information about the vc mailing list