From 4a93980a14883349cd84b1ccc318ba36a8abe885 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 16 Apr 2014 15:17:32 +0200 Subject: doc: rtems_get_current_processor() --- doc/user/smp.t | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'doc/user/smp.t') 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 @@ -257,6 +258,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 -- cgit v1.2.3