diff options
-rw-r--r-- | os/kernel/include/condvars.h | 11 | ||||
-rw-r--r-- | os/kernel/include/mailboxes.h | 7 | ||||
-rw-r--r-- | os/kernel/include/queues.h | 7 |
3 files changed, 23 insertions, 2 deletions
diff --git a/os/kernel/include/condvars.h b/os/kernel/include/condvars.h index 9ef977059..2318ecf6e 100644 --- a/os/kernel/include/condvars.h +++ b/os/kernel/include/condvars.h @@ -31,7 +31,14 @@ #ifndef _CONDVARS_H_
#define _CONDVARS_H_
-#if CH_USE_CONDVARS && CH_USE_MUTEXES
+#if CH_USE_CONDVARS
+
+/*
+ * Module dependancies check.
+ */
+#if !CH_USE_MUTEXES
+#error "CH_USE_CONDVARS requires CH_USE_MUTEXES"
+#endif
/**
* @brief CondVar structure.
@@ -73,7 +80,7 @@ extern "C" { */
#define CONDVAR_DECL(name) CondVar name = _CONDVAR_DATA(name)
-#endif /* CH_USE_CONDVARS && CH_USE_MUTEXES */
+#endif /* CH_USE_CONDVARS */
#endif /* _CONDVARS_H_ */
diff --git a/os/kernel/include/mailboxes.h b/os/kernel/include/mailboxes.h index 9e795590b..959d1ce37 100644 --- a/os/kernel/include/mailboxes.h +++ b/os/kernel/include/mailboxes.h @@ -29,6 +29,13 @@ #if CH_USE_MAILBOXES
+/*
+ * Module dependancies check.
+ */
+#if !CH_USE_SEMAPHORES
+#error "CH_USE_MAILBOXES requires CH_USE_SEMAPHORES"
+#endif
+
typedef struct {
msg_t *mb_buffer; /**< Pointer to the mailbox buffer.*/
msg_t *mb_top; /**< Pointer to the first location
diff --git a/os/kernel/include/queues.h b/os/kernel/include/queues.h index 1c32d3d7d..9082ea5f7 100644 --- a/os/kernel/include/queues.h +++ b/os/kernel/include/queues.h @@ -27,6 +27,13 @@ #ifndef _QUEUES_H_ #define _QUEUES_H_ +/* + * Module dependancies check. + */ +#if !CH_USE_SEMAPHORES +#error "CH_USE_QUEUES requires CH_USE_SEMAPHORES" +#endif + /** Queue notification callback type. */ typedef void (*qnotify_t)(void); |