posix arch: Untangle headers

posix_soc_if.h is meant to be a private header between
the POSIX ARCH, SOC, and maybe boards,
it should not contain definitions meant to be used directly
by the kernel or app.

Some definitions were placed here due to a dependency moebius
loop.
Unravel that by removing all header dependencies in posix_soc_if.h,
move those definitions out to a more logical place,
and while we are here reduce the amount of users of
irq_offload.h in POSIX arch related code

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
Alberto Escolar Piedras 2019-10-25 14:54:17 +02:00 committed by Andrew Boie
commit f974cb0ae1
5 changed files with 19 additions and 17 deletions

View file

@ -25,6 +25,7 @@
#include <arch/posix/asm_inline.h>
#include <board_irq.h> /* Each board must define this */
#include <sw_isr_table.h>
#include <posix_soc_if.h>
#ifdef __cplusplus
extern "C" {
@ -61,6 +62,17 @@ static ALWAYS_INLINE bool z_arch_irq_unlocked(unsigned int key)
return key == false;
}
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);
}
#ifdef __cplusplus
}
#endif