intel64: add inline definition of z_arch_switch()
This just calls the assembly code. Needed to be inline per the architecture API. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
b12a094d63
commit
7f715bd113
2 changed files with 11 additions and 4 deletions
|
@ -183,7 +183,7 @@ x86_sse_init:
|
|||
mxcsr: .long X86_MXCSR_SANE
|
||||
|
||||
/*
|
||||
* void z_arch_switch(void *switch_to, void **switched_from);
|
||||
* void z_x86_switch(void *switch_to, void **switched_from);
|
||||
*
|
||||
* Note that switch_handle for us is simply a pointer to the containing
|
||||
* 'struct k_thread', thus:
|
||||
|
@ -192,8 +192,8 @@ mxcsr: .long X86_MXCSR_SANE
|
|||
* RSI = (struct k_thread **) switched_from
|
||||
*/
|
||||
|
||||
.globl z_arch_switch
|
||||
z_arch_switch:
|
||||
.globl z_x86_switch
|
||||
z_x86_switch:
|
||||
movq (%rsi), %rsi
|
||||
|
||||
andb $~X86_THREAD_FLAG_ALL, _thread_offset_to_flags(%rsi)
|
||||
|
|
|
@ -6,9 +6,16 @@
|
|||
#ifndef ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_
|
||||
#define ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_
|
||||
|
||||
#include <kernel_structs.h>
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
extern void z_arch_switch(void *switch_to, void **switched_from);
|
||||
extern void z_x86_switch(void *switch_to, void **switched_from);
|
||||
|
||||
static inline void z_arch_switch(void *switch_to, void **switched_from)
|
||||
{
|
||||
z_x86_switch(switch_to, switched_from);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initialize scheduler IPI vector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue