aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil/ports/e200/nilcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/nil/ports/e200/nilcore.h')
-rw-r--r--os/nil/ports/e200/nilcore.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/os/nil/ports/e200/nilcore.h b/os/nil/ports/e200/nilcore.h
index 9da268038..3405a9bc5 100644
--- a/os/nil/ports/e200/nilcore.h
+++ b/os/nil/ports/e200/nilcore.h
@@ -290,6 +290,18 @@ struct port_intctx {
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
/**
+ * @brief Priority level verification macro.
+ */
+#define PORT_IRQ_IS_VALID_PRIORITY(n) \
+ (((n) >= 0U) && ((n) < INTC_PRIORITY_LEVELS))
+
+/**
+ * @brief Priority level verification macro.
+ */
+#define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) \
+ (((n) >= 0U) && ((n) < INTC_PRIORITY_LEVELS))
+
+/**
* @brief Performs a context switch between two threads.
* @details This is the most critical code in any port, this function
* is responsible for the context switch between 2 threads.