47 #include "os/os_error.h"
63 #define min(a, b) ((a)<(b)?(a):(b))
67 #define max(a, b) ((a)>(b)?(a):(b))
70 #define OS_ALIGN(__n, __a) ( \
71 (((__n) & ((__a) - 1)) == 0) ? \
73 ((__n) + ((__a) - ((__n) & ((__a) - 1)))) \
75 #define OS_ALIGNMENT (4)
87 #define OS_ENTER_CRITICAL(_sr) (_sr = os_hw_enter_critical())
88 #define OS_EXIT_CRITICAL(_sr) (os_hw_exit_critical(_sr))
89 #define OS_ASSERT_CRITICAL() assert(os_hw_is_in_critical())
124 #include "os/endian.h"
125 #include "os/os_callout.h"
126 #include "os/os_cputime.h"
129 #include "os/os_mbuf.h"
130 #include "os/os_mempool.h"
131 #include "os/os_mutex.h"
132 #include "os/os_sem.h"
133 #include "os/os_task.h"
135 #include "os/os_trace_api.h"
136 #include "os/queue.h"
138 #if IS_USED(MODULE_NIMBLE)
139 #include "nimble/nimble_npl.h"
POSIX.1-2008 compliant version of the assert macro.
MAYBE_INLINE void irq_restore(unsigned state)
This function restores the IRQ disable bit in the status register to the value contained within passe...
MAYBE_INLINE unsigned irq_disable(void)
This function sets the IRQ disable bit in the status register.
MAYBE_INLINE bool irq_is_enabled(void)
Test if IRQs are currently enabled.
MAYBE_INLINE bool irq_is_in(void)
Check whether called from interrupt service routine.
static bool os_hw_is_in_critical(void)
Check if is in critical section.
static void os_hw_exit_critical(uint32_t ctx)
Restores ISR context.
static uint32_t os_hw_enter_critical(void)
Disable ISRs.
uint32_t os_sr_t
CPU status register.
Abstraction layer for RIOT adaption.
mynewt-core event and event queue abstraction
mynewt-core time abstraction