diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-18 16:40:15 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-04-18 16:40:15 +0000 |
commit | 814b642a0ced73a71ceb3b548c2c570e8631dd58 (patch) | |
tree | b2fb649dca949d8781a2421ae9a52c58780448ca /os/kernel | |
parent | e394b3218a459c2dd323c7b1dcaf0c547d37ad8f (diff) | |
download | ChibiOS-814b642a0ced73a71ceb3b548c2c570e8631dd58.tar.gz ChibiOS-814b642a0ced73a71ceb3b548c2c570e8631dd58.tar.bz2 ChibiOS-814b642a0ced73a71ceb3b548c2c570e8631dd58.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4112 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r-- | os/kernel/include/ch.h | 34 | ||||
-rw-r--r-- | os/kernel/src/chmtx.c | 2 |
2 files changed, 27 insertions, 9 deletions
diff --git a/os/kernel/include/ch.h b/os/kernel/include/ch.h index 7386b622b..3696f78b3 100644 --- a/os/kernel/include/ch.h +++ b/os/kernel/include/ch.h @@ -62,25 +62,43 @@ #define CH_KERNEL_PATCH 0
/** @} */
-/*
- * Common values.
+/**
+ * @name Common constants
+ */
+/**
+ * @brief Generic 'false' boolean constant.
*/
-#ifndef FALSE
+#if !defined(FALSE) || defined(__DOXYGEN__)
#define FALSE 0
#endif
-#ifndef TRUE
+
+/**
+ * @brief Generic 'true' boolean constant.
+ */
+#if !defined(TRUE) || defined(__DOXYGEN__)
#define TRUE (!FALSE)
#endif
-/*
- * Human readable boolean error conditions.
+/**
+ * @brief Generic success constant.
+ * @details This constant is functionally equivalent to @p FALSE but more
+ * readable, it can be used as return value of all those functions
+ * returning a @p bool_t as a status indicator.
*/
-#ifndef CH_SUCCESS
+#if !defined(CH_SUCCESS) || defined(__DOXYGEN__)
#define CH_SUCCESS FALSE
#endif
-#ifndef CH_FAILED
+
+/**
+ * @brief Generic failure constant.
+ * @details This constant is functionally equivalent to @p TRUE but more
+ * readable, it can be used as return value of all those functions
+ * returning a @p bool_t as a status indicator.
+ */
+#if !defined(CH_FAILED) || defined(__DOXYGEN__)
#define CH_FAILED TRUE
#endif
+/** @} */
#include "chconf.h"
#include "chtypes.h"
diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c index 20a4700fe..6e32ca439 100644 --- a/os/kernel/src/chmtx.c +++ b/os/kernel/src/chmtx.c @@ -258,7 +258,7 @@ Mutex *chMtxUnlock(void) { chDbgAssert(ctp->p_mtxlist->m_owner == ctp,
"chMtxUnlock(), #2",
"ownership failure");
- /* Removes the top Mutex from the Thread's owned mutexes list and matk it
+ /* Removes the top Mutex from the Thread's owned mutexes list and marks it
as not owned.*/
ump = ctp->p_mtxlist;
ctp->p_mtxlist = ump->m_next;
|