diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-11-02 13:35:02 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-11-02 13:35:02 +0000 |
commit | 48816d7d7a60a8bc07ef3fe397ad20657761d284 (patch) | |
tree | 5849908364b2d6b1e97444233bcd2d20572a9a1c /cpukit/score/include | |
parent | Assume gdb >= 6.4 (diff) | |
download | rtems-48816d7d7a60a8bc07ef3fe397ad20657761d284.tar.bz2 |
2007-11-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/cpu/sparc/cpu.c, score/cpu/sparc/rtems/score/cpu.h,
score/include/rtems/score/context.h, score/src/threadhandler.c: Fix
stack so gdb backtrace does not print corrupted frame message after
_Thread_Handler. Daniel Hellstrom <daniel@gaisler.com> provided the
SPARC implementation and I made it more general.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/context.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/context.h b/cpukit/score/include/rtems/score/context.h index 87c61957ba..46ecff3686 100644 --- a/cpukit/score/include/rtems/score/context.h +++ b/cpukit/score/include/rtems/score/context.h @@ -69,6 +69,22 @@ SCORE_EXTERN volatile boolean _Context_Switch_necessary; _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp ) /** + * This macro is invoked from _Thread_Handler to do whatever CPU + * specific magic is required that must be done in the context of + * the thread when it starts. + * + * If the CPU architecture does not require any magic, then this + * macro is empty. + */ + +#if defined(_CPU_Context_Initialization_at_thread_begin) + #define _Context_Initialization_at_thread_begin() \ + _CPU_Context_Initialization_at_thread_begin() +#else + #define _Context_Initialization_at_thread_begin() +#endif + +/** * @brief Perform Context Switch * * This routine saves the current context into the @a _executing |