[PATCH] score/i386: Add context switch restore external symbol as a marker.
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jul 22 05:26:55 UTC 2016
Could we please use the _CPU_* prefix only for stuff defined by the CPU
port interface and use something like _I386_* for things that are
specific to a particular architecture.
On 22/07/16 03:17, Chris Johns wrote:
> Add an external symbol as a marker to the restore point in the
> context switch. If you set the IP to this location for a blocked
> thread and you use the saved register values in the TCB you can
> view the thread's context.
> ---
> cpukit/score/cpu/i386/cpu_asm.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/cpukit/score/cpu/i386/cpu_asm.S b/cpukit/score/cpu/i386/cpu_asm.S
> index 45079a6..3c20fd4 100644
> --- a/cpukit/score/cpu/i386/cpu_asm.S
> +++ b/cpukit/score/cpu/i386/cpu_asm.S
> @@ -43,6 +43,7 @@
>
> .p2align 1
> PUBLIC (_CPU_Context_switch)
> + PUBLIC (_CPU_Context_switch_Restore_Marker)
>
> .set RUNCONTEXT_ARG, 4 /* save context argument */
> .set HEIRCONTEXT_ARG, 8 /* restore context argument */
> @@ -75,6 +76,7 @@ SYM (_CPU_Context_switch):
> movb $1, I386_CONTEXT_CONTROL_IS_EXECUTING_OFFSET(eax)
> #endif
>
> +_CPU_Context_switch_Restore_Marker:
> restore:
> pushl REG_EFLAGS(eax) /* push eflags */
> popf /* restore eflags */
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list