aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/common/ports/e200/compilers/GCC/rules.mk2
-rw-r--r--os/common/ports/e200/devices/SPC560BCxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC560Bxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC560Dxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC560Pxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC563Mxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC564Axx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC56ECxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC56ELxx/intc.h5
-rw-r--r--os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h5
-rw-r--r--os/nil/ports/e200/nilcore.h12
-rw-r--r--os/rt/ports/ARMCMx/compilers/GCC/chtypes.h1
-rw-r--r--os/rt/ports/e200/chcore.h12
-rw-r--r--os/rt/ports/e200/compilers/GCC/chtypes.h2
14 files changed, 70 insertions, 4 deletions
diff --git a/os/common/ports/e200/compilers/GCC/rules.mk b/os/common/ports/e200/compilers/GCC/rules.mk
index f54bb4a9e..c7f9d9b03 100644
--- a/os/common/ports/e200/compilers/GCC/rules.mk
+++ b/os/common/ports/e200/compilers/GCC/rules.mk
@@ -210,8 +210,6 @@ else
@$(OD) $(ODFLAGS) $< > $@
@echo
@$(SZ) $<
- @echo
- @echo Done
endif
%.list: %.elf $(LDSCRIPT)
diff --git a/os/common/ports/e200/devices/SPC560BCxx/intc.h b/os/common/ports/e200/devices/SPC560BCxx/intc.h
index 7535fd136..668eac387 100644
--- a/os/common/ports/e200/devices/SPC560BCxx/intc.h
+++ b/os/common/ports/e200/devices/SPC560BCxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC560Bxx/intc.h b/os/common/ports/e200/devices/SPC560Bxx/intc.h
index 4feacf22a..bde2c94aa 100644
--- a/os/common/ports/e200/devices/SPC560Bxx/intc.h
+++ b/os/common/ports/e200/devices/SPC560Bxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC560Dxx/intc.h b/os/common/ports/e200/devices/SPC560Dxx/intc.h
index 73843b436..6c3bbec60 100644
--- a/os/common/ports/e200/devices/SPC560Dxx/intc.h
+++ b/os/common/ports/e200/devices/SPC560Dxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC560Pxx/intc.h b/os/common/ports/e200/devices/SPC560Pxx/intc.h
index 0d76d5be6..75440fb75 100644
--- a/os/common/ports/e200/devices/SPC560Pxx/intc.h
+++ b/os/common/ports/e200/devices/SPC560Pxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC563Mxx/intc.h b/os/common/ports/e200/devices/SPC563Mxx/intc.h
index 5112d1f81..b7a5d920a 100644
--- a/os/common/ports/e200/devices/SPC563Mxx/intc.h
+++ b/os/common/ports/e200/devices/SPC563Mxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC564Axx/intc.h b/os/common/ports/e200/devices/SPC564Axx/intc.h
index 480140f18..7f34613d9 100644
--- a/os/common/ports/e200/devices/SPC564Axx/intc.h
+++ b/os/common/ports/e200/devices/SPC564Axx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC56ECxx/intc.h b/os/common/ports/e200/devices/SPC56ECxx/intc.h
index 844d75657..bb8b13dbc 100644
--- a/os/common/ports/e200/devices/SPC56ECxx/intc.h
+++ b/os/common/ports/e200/devices/SPC56ECxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC56ELxx/intc.h b/os/common/ports/e200/devices/SPC56ELxx/intc.h
index f1ed08baa..bb4c98f57 100644
--- a/os/common/ports/e200/devices/SPC56ELxx/intc.h
+++ b/os/common/ports/e200/devices/SPC56ELxx/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x18)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h b/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h
index 7060e0674..ef660f195 100644
--- a/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h
+++ b/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h
@@ -41,6 +41,11 @@
#define INTC_EOIR_ADDR (INTC_BASE + 0x30)
/** @} */
+/**
+ * @brief INTC priority levels.
+ */
+#define INTC_PRIORITY_LEVELS 16U
+
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
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.
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h b/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h
index af3349d79..c500da63b 100644
--- a/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h
+++ b/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h
@@ -40,7 +40,6 @@
*/
#if !defined(FALSE) || defined(__DOXYGEN__)
#define FALSE 0
-
#endif
/**
diff --git a/os/rt/ports/e200/chcore.h b/os/rt/ports/e200/chcore.h
index f1485b81a..c0b96e2df 100644
--- a/os/rt/ports/e200/chcore.h
+++ b/os/rt/ports/e200/chcore.h
@@ -331,6 +331,18 @@ struct context {
#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.
diff --git a/os/rt/ports/e200/compilers/GCC/chtypes.h b/os/rt/ports/e200/compilers/GCC/chtypes.h
index 87bb6b74d..2973f8ef8 100644
--- a/os/rt/ports/e200/compilers/GCC/chtypes.h
+++ b/os/rt/ports/e200/compilers/GCC/chtypes.h
@@ -98,7 +98,7 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
/**
* @brief Optimized thread function declaration macro.
*/
-#define PORT_THD_FUNCTION(tname, arg) msg_t tname(void *arg)
+#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
#endif /* _CHTYPES_H_ */