summaryrefslogtreecommitdiffstats
path: root/porting
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-10-27 19:47:07 -0500
committerJoel Sherrill <joel@rtems.org>2016-10-27 19:47:07 -0500
commit36def9125c9adf4049a18105d48715ac8606e1ec (patch)
treeb9a3c06d3fad69f3213474d5d16d844b862cc268 /porting
parent2b175c323836ceb3bfcf0f5e32409c8bb570a89b (diff)
downloadrtems-docs-36def9125c9adf4049a18105d48715ac8606e1ec.tar.bz2
rtems-docs: Fix many unnecessary back slashes
Diffstat (limited to 'porting')
-rw-r--r--porting/cpu_init.rst2
-rw-r--r--porting/idle_thread.rst12
-rw-r--r--porting/interrupts.rst42
-rw-r--r--porting/priority_bitmap.rst12
-rw-r--r--porting/task_context.rst60
5 files changed, 64 insertions, 64 deletions
diff --git a/porting/cpu_init.rst b/porting/cpu_init.rst
index 8de4744..39a27ed 100644
--- a/porting/cpu_init.rst
+++ b/porting/cpu_init.rst
@@ -19,7 +19,7 @@ The _CPU_Initialize routine performs processor dependent initialization.
.. code:: c
void _CPU_Initialize(
- void (\*thread_dispatch) /* may be ignored \*/
+ void (*thread_dispatch) /* may be ignored */
)
The thread_dispatch argument is the address of the entry point for the
diff --git a/porting/idle_thread.rst b/porting/idle_thread.rst
index 397a218..c0a350a 100644
--- a/porting/idle_thread.rst
+++ b/porting/idle_thread.rst
@@ -73,7 +73,7 @@ CPU_PROVIDES_IDLE_THREAD_BODY macro should be defined to TRUE. This
routine is prototyped as follows:
.. code:: c
- void \*_CPU_Thread_Idle_body( uintptr_t );
+ void *_CPU_Thread_Idle_body( uintptr_t );
As mentioned above, RTEMS does not require that a CPU dependent IDLE
thread body be provided as part of the port. If
@@ -82,9 +82,9 @@ independent algorithm is used. This algorithm consists of a "branch to
self" which is implemented in a routine as follows.
.. code:: c
- void \*_Thread_Idle_body( uintptr_t ignored )
+ void *_Thread_Idle_body( uintptr_t ignored )
{
- while( 1 ) ;
+ while( 1 ) ;
}
If the CPU dependent IDLE thread body is implementation centers upon using
@@ -93,10 +93,10 @@ in an infinite loop as the CPU will have to reexecute this instruction
each time the IDLE thread is dispatched.
.. code:: c
- void \*_CPU_Thread_Idle_body( uintptr_t ignored )
+ void *_CPU_Thread_Idle_body( uintptr_t ignored )
{
- for( ; ; )
- /* insert your "halt" instruction here \*/ ;
+ for( ; ; )
+ /* insert your "halt" instruction here */ ;
}
Be warned. Some processors with onboard DMA have been known to stop the
diff --git a/porting/interrupts.rst b/porting/interrupts.rst
index 970bb58..00013ed 100644
--- a/porting/interrupts.rst
+++ b/porting/interrupts.rst
@@ -87,8 +87,8 @@ dummy implementation that simply sets the previous level to 0.
.. code:: c
#define _CPU_ISR_Disable( _isr_cookie ) \\
- { \\
- (_isr_cookie) = 0; /* do something to prevent warnings \*/ \\
+ { \
+ (_isr_cookie) = 0; /* do something to prevent warnings */ \
}
The following is the implementation from the Motorola M68K port:
@@ -186,8 +186,8 @@ NOTE: This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE.
If the CPU_HAS_SOFTWARE_INTERRUPT_STACK macro is set to TRUE, then RTEMS automatically allocates the stack memory in the initialization of the Interrupt Manager and the switch to that stack is performed in ``_ISR_Handler`` on the outermost interrupt. The _CPU_Interrupt_stack_low and _CPU_Interrupt_stack_high variables contain the addresses of the the lowest and highest addresses of the memory allocated for the interrupt stack. Although technically only one of these addresses is required to switch to the interrupt stack, by always providing both addresses, the port has more options avaialble to it without requiring modifications to the portable parts of the executive. Whether the stack grows up or down, this give the CPU dependent code the option of picking the version it wants to use.
.. code:: c
- SCORE_EXTERN void \*_CPU_Interrupt_stack_low;
- SCORE_EXTERN void \*_CPU_Interrupt_stack_high;
+ SCORE_EXTERN void *_CPU_Interrupt_stack_low;
+ SCORE_EXTERN void *_CPU_Interrupt_stack_high;
NOTE: These two variables are required if the macro
CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
@@ -214,9 +214,9 @@ The _CPU_ISR_install_raw_handler XXX
.. code:: c
void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr \*old_handler
+ unsigned32 vector,
+ proc_ptr new_handler,
+ proc_ptr *old_handler
)
This is where we install the interrupt handler into the "raw" interrupt
@@ -239,7 +239,7 @@ and mapped into a user provided handler.
#define CPU_INTERRUPT_NUMBER_OF_VECTORS 32
#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER \\
- (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
+ (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
Install RTEMS Interrupt Handler
-------------------------------
@@ -254,9 +254,9 @@ new_handler - replacement ISR for this vector number
.. code:: c
void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr \*old_handler
+ unsigned32 vector,
+ proc_ptr new_handler,
+ proc_ptr *old_handler
)
.. code:: c
@@ -293,8 +293,8 @@ examine the saved state.
.. code:: c
typedef struct {
- unsigned32 not_preserved_register_1;
- unsigned32 special_interrupt_register;
+ unsigned32 not_preserved_register_1;
+ unsigned32 special_interrupt_register;
} CPU_Interrupt_frame;
Interrupt Dispatching
@@ -338,22 +338,22 @@ another interrupt nests this one) and branches to ``_ISR_Handler``.
save some or all context on stack
may need to save some special interrupt information for exit
#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- if ( _ISR_Nest_level == 0 )
- switch to software interrupt stack
+ if ( _ISR_Nest_level == 0 )
+ switch to software interrupt stack
#endif
_ISR_Nest_level++;
_Thread_Dispatch_disable_level++;
- (\*_ISR_Vector_table[ vector ])( vector );
+ (*_ISR_Vector_table[ vector ])( vector );
--_ISR_Nest_level;
if ( _ISR_Nest_level )
- goto the label "exit interrupt (simple case)"
+ goto the label "exit interrupt (simple case)"
#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- restore stack
+ restore stack
#endif
if ( _Thread_Dispatch_disable_level )
- goto the label "exit interrupt (simple case)"
+ goto the label "exit interrupt (simple case)"
if ( _Thread_Dispatch_necessary )
- call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
+ call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
prepare to get out of interrupt
return from interrupt (maybe to _ISR_Dispatch)
LABEL "exit interrupt (simple case):
@@ -392,7 +392,7 @@ invoke that routine at the end of the interrupt sequence (if a dispatch is
necessary).
.. code:: c
- void (\*_CPU_Thread_dispatch_pointer)();
+ void (*_CPU_Thread_dispatch_pointer)();
.. COMMENT: COPYRIGHT (c) 1988-2002.
diff --git a/porting/priority_bitmap.rst b/porting/priority_bitmap.rst
index d546f8f..4ce89cb 100644
--- a/porting/priority_bitmap.rst
+++ b/porting/priority_bitmap.rst
@@ -56,9 +56,9 @@ The _CPU_Bitfield_Find_first_bit routine sets _output to the bit number of
the first bit set in ``_value``. ``_value`` is of CPU dependent type``Priority_bit_map_Control``. A stub version of this routine is as follows:
.. code:: c
- #define _CPU_Bitfield_Find_first_bit( _value, _output ) \\
- { \\
- (_output) = 0; /* do something to prevent warnings \*/ \\
+ #define _CPU_Bitfield_Find_first_bit( _value, _output ) \
+ { \
+ (_output) = 0; /* do something to prevent warnings */ \
}
There are a number of variables in using a "find first bit" type
@@ -129,9 +129,9 @@ something like this stub example did:
.. code:: c
#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
- #define _CPU_Bitfield_Find_first_bit( _value, _output ) \\
- { \\
- (_output) = 0; /* do something to prevent warnings \*/ \\
+ #define _CPU_Bitfield_Find_first_bit( _value, _output ) \
+ { \
+ (_output) = 0; /* do something to prevent warnings */ \
}
#endif
diff --git a/porting/task_context.rst b/porting/task_context.rst
index 206372d..c9cf53a 100644
--- a/porting/task_context.rst
+++ b/porting/task_context.rst
@@ -64,7 +64,7 @@ when there are no special requirements:
#define CPU_STACK_ALIGNMENT 0
-NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT. \[XXX is this true?]
+NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT. [XXX is this true?]
Task Context
============
@@ -149,12 +149,12 @@ start time. The _CPU_Context_initialize routine is prototyped as follows:
.. code:: c
void _CPU_Context_Initialize(
- Context_Control \*_the_context,
- void \*_stack_base,
- unsigned32 _size,
- unsigned32 _isr,
- void \*_entry_point,
- unsigned32 _is_fp
+ Context_Control *_the_context,
+ void *_stack_base,
+ unsigned32 _size,
+ unsigned32 _isr,
+ void *_entry_point,
+ unsigned32 _is_fp
);
The ``is_fp`` parameter is TRUE if the thread is to be a floating point
@@ -186,8 +186,8 @@ context of the current executing thread to the context of the heir thread.
.. code:: c
void _CPU_Context_switch(
- Context_Control \*run,
- Context_Control \*heir
+ Context_Control *run,
+ Context_Control *heir
);
This routine begins by saving the current state of the
@@ -239,7 +239,7 @@ unnecessary to reload some registers.
.. code:: c
void _CPU_Context_restore(
- Context_Control \*new_context
+ Context_Control *new_context
);
Restarting the Currently Executing Task
@@ -257,8 +257,8 @@ The following is an implementation of _CPU_Context_Restart_self that can
be used when no special handling is required for this case.
.. code:: c
- #define _CPU_Context_Restart_self( _the_context ) \\
- _CPU_Context_restore( (_the_context) )
+ #define _CPU_Context_Restart_self( _the_context ) \
+ _CPU_Context_restore( (_the_context) )
XXX find a port which does not do it this way and include it here
@@ -284,11 +284,11 @@ The following example illustrates how the CPU_HARDWARE_FP (XXX macro name
is varying) macro is set based on the CPU family dependent macro.
.. code:: c
- #if ( THIS_CPU_FAMILY_HAS_FPU == 1 ) /* where THIS_CPU_FAMILY \*/
- /* might be M68K \*/
- #define CPU_HARDWARE_FP TRUE
+ #if ( THIS_CPU_FAMILY_HAS_FPU == 1 ) /* where THIS_CPU_FAMILY */
+ /* might be M68K */
+ #define CPU_HARDWARE_FP TRUE
#else
- #define CPU_HARDWARE_FP FALSE
+ #define CPU_HARDWARE_FP FALSE
#endif
The macro name THIS_CPU_FAMILY_HAS_FPU should be made CPU specific. It
@@ -438,8 +438,8 @@ use this implementation since the floating point context is saved as a
sequence of store operations.
.. code:: c
- #define _CPU_Context_Fp_start( _base, _offset ) \\
- ( (void \*) _Addresses_Add_offset( (_base), (_offset) ) )
+ #define _CPU_Context_Fp_start( _base, _offset ) \
+ ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
In contrast, the m68k treats the floating point context area as a stack
which grows downward in memory. Thus the following implementation of
@@ -468,10 +468,10 @@ point context passed to it. The following example implementation shows
how to accomplish this:
.. code:: c
- #define _CPU_Context_Initialize_fp( _destination ) \\
- { \\
- \*((Context_Control_fp \*) \*((void \**) _destination)) = \\
- _CPU_Null_fp_context; \\
+ #define _CPU_Context_Initialize_fp( _destination ) \
+ { \
+ *((Context_Control_fp *) *((void **) _destination)) = \\
+ _CPU_Null_fp_context; \\
}
The _CPU_Null_fp_context is optional. A port need only include this variable when it uses the above mechanism to initialize a floating point context. This is typically done on CPUs where it is difficult to generate an "uninitialized" FP context. If the port requires this variable, then it is declared as follows:
@@ -483,34 +483,34 @@ Saving a Floating Point Context
-------------------------------
The _CPU_Context_save_fp_context routine is responsible for saving the FP
-context at \*fp_context_ptr. If the point to load the FP context from is
+context at *fp_context_ptr. If the point to load the FP context from is
changed then the pointer is modified by this routine.
Sometimes a macro implementation of this is in cpu.h which dereferences
-the \** and a similarly named routine in this file is passed something like
-a (Context_Control_fp \*). The general rule on making this decision is to
+the ** and a similarly named routine in this file is passed something like
+a (Context_Control_fp *). The general rule on making this decision is to
avoid writing assembly language.
.. code:: c
void _CPU_Context_save_fp(
- void \**fp_context_ptr
+ void **fp_context_ptr
)
Restoring a Floating Point Context
----------------------------------
The _CPU_Context_restore_fp_context is responsible for restoring the FP
-context at \*fp_context_ptr. If the point to load the FP context from is
+context at *fp_context_ptr. If the point to load the FP context from is
changed then the pointer is modified by this routine.
Sometimes a macro implementation of this is in cpu.h which dereferences
-the \** and a similarly named routine in this file is passed something like
-a (Context_Control_fp \*). The general rule on making this decision is to
+the ** and a similarly named routine in this file is passed something like
+a (Context_Control_fp *). The general rule on making this decision is to
avoid writing assembly language.
.. code:: c
void _CPU_Context_restore_fp(
- void \**fp_context_ptr
+ void **fp_context_ptr
);
.. COMMENT: COPYRIGHT (c) 1988-2002.