kernel: activate arch interface headers

Duplicate definitions elsewhere have been removed.

A couple functions which are defined by the arch interface
to be non-inline, but were implemented inline by native_posix
and intel64, have been moved to non-inline.

Some missing conditional compilation for z_arch_irq_offload()
has been fixed, as this is an optional feature.

Some massaging of native_posix headers to get everything
in the right scope.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-10-03 15:20:41 -07:00 committed by Andrew Boie
commit 979b17f243
16 changed files with 54 additions and 165 deletions

View file

@ -9,6 +9,8 @@
#ifndef ZEPHYR_INCLUDE_ARCH_CPU_H_
#define ZEPHYR_INCLUDE_ARCH_CPU_H_
#include <sys/arch_inlines.h>
#if defined(CONFIG_X86)
#include <arch/x86/arch.h>
#elif defined(CONFIG_X86_64)

View file

@ -56,35 +56,6 @@ static ALWAYS_INLINE void z_arch_nop(void)
__asm__ volatile("nop");
}
static ALWAYS_INLINE unsigned int z_arch_irq_lock(void)
{
return posix_irq_lock();
}
static ALWAYS_INLINE void z_arch_irq_unlock(unsigned int key)
{
posix_irq_unlock(key);
}
static ALWAYS_INLINE void z_arch_irq_enable(unsigned int irq)
{
posix_irq_enable(irq);
}
static ALWAYS_INLINE void z_arch_irq_disable(unsigned int irq)
{
posix_irq_disable(irq);
}
static ALWAYS_INLINE int z_arch_irq_is_enabled(unsigned int irq)
{
return posix_irq_is_enabled(irq);
}
/**
* Returns true if interrupts were unlocked prior to the
* z_arch_irq_lock() call that produced the key argument.
*/
static ALWAYS_INLINE bool z_arch_irq_unlocked(unsigned int key)
{
return key == false;

View file

@ -21,6 +21,7 @@
#include <stdbool.h>
#include <arch/common/ffs.h>
#include <misc/util.h>
#include <arch/x86/ia32/syscall.h>
#ifndef _ASMLANGUAGE
#include <stddef.h> /* for size_t */