aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-07 11:07:31 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-07 11:07:31 +0000
commit272b51ba236d6636bda3ee961cba35eb489d30af (patch)
tree2120de0e1054da930c0c54b7a071f5fd73ac3014 /os/rt/include
parent57585301af1df353c3dd3a6e389d074bd4de4fcc (diff)
downloadChibiOS-272b51ba236d6636bda3ee961cba35eb489d30af.tar.gz
ChibiOS-272b51ba236d6636bda3ee961cba35eb489d30af.tar.bz2
ChibiOS-272b51ba236d6636bda3ee961cba35eb489d30af.zip
MISRAs done for RT.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7727 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include')
-rw-r--r--os/rt/include/chdebug.h2
-rw-r--r--os/rt/include/chschd.h8
-rw-r--r--os/rt/include/chsys.h2
-rw-r--r--os/rt/include/chthreads.h2
4 files changed, 10 insertions, 4 deletions
diff --git a/os/rt/include/chdebug.h b/os/rt/include/chdebug.h
index 2e4b846f3..a839813d7 100644
--- a/os/rt/include/chdebug.h
+++ b/os/rt/include/chdebug.h
@@ -192,7 +192,9 @@ typedef struct {
#if !defined(chDbgAssert)
#if CH_DBG_ENABLE_ASSERTS == TRUE
#define chDbgAssert(c, r) do { \
+ /*lint -save -e506 -e774 [2.1, 14.3] Can be a constant.*/ \
if (!(c)) { \
+ /*lint -restore*/ \
chSysHalt(__func__); \
} \
} while (false)
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h
index c106dd9b0..78fac0004 100644
--- a/os/rt/include/chschd.h
+++ b/os/rt/include/chschd.h
@@ -617,10 +617,10 @@ static inline void queue_init(threads_queue_t *tqp) {
*
* @notapi
*/
-static inline bool queue_isempty(threads_queue_t *tqp) {
+static inline bool queue_isempty(const threads_queue_t *tqp) {
/*lint -save -e9087 -e740 [11.3, 1.3] Cast required by list handling.*/
- return (bool)(tqp->p_next == (thread_t *)tqp);
+ return (bool)(tqp->p_next == (const thread_t *)tqp);
/*lint -restore*/
}
@@ -632,10 +632,10 @@ static inline bool queue_isempty(threads_queue_t *tqp) {
*
* @notapi
*/
-static inline bool queue_notempty(threads_queue_t *tqp) {
+static inline bool queue_notempty(const threads_queue_t *tqp) {
/*lint -save -e9087 -e740 [11.3, 1.3] Cast required by list handling.*/
- return (bool)(tqp->p_next != (thread_t *)tqp);
+ return (bool)(tqp->p_next != (const thread_t *)tqp);
/*lint -restore*/
}
diff --git a/os/rt/include/chsys.h b/os/rt/include/chsys.h
index 88814fa16..af725f627 100644
--- a/os/rt/include/chsys.h
+++ b/os/rt/include/chsys.h
@@ -28,6 +28,8 @@
#ifndef _CHSYS_H_
#define _CHSYS_H_
+/*lint -sem(chSysHalt, r_no)*/
+
/*===========================================================================*/
/* Module constants. */
/*===========================================================================*/
diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h
index 6632d8d62..966f5de08 100644
--- a/os/rt/include/chthreads.h
+++ b/os/rt/include/chthreads.h
@@ -28,6 +28,8 @@
#ifndef _CHTHREADS_H_
#define _CHTHREADS_H_
+/*lint -sem(chThdExit, r_no) -sem(chThdExitS, r_no)*/
+
/*===========================================================================*/
/* Module constants. */
/*===========================================================================*/