arch: posix: isolate arch-soc/board IF from kernel-arch IF
The POSIX ARCH delegates some of the tasks which normally are taken care of by the ARCH to the SOC or BOARD levels. To avoid changes in the kernel-arch IF propagating into the arch-soc and arch-board interfaces (which would break off-tree posix boards) isolate them. Also move arch inlined functions into the arch.h header, and out from the headers which specify the posix arch-soc and arch-board interfaces. Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
d1aca7f11b
commit
b237597ab9
8 changed files with 121 additions and 118 deletions
|
@ -59,6 +59,40 @@ 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;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue