aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chmtx.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-10 14:50:32 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-10 14:50:32 +0000
commiteb7a1a15b23341693864c6fc13ac5eab5c1d6122 (patch)
treec34ea755269ab2f4d740065de79993647ec94e90 /os/kernel/src/chmtx.c
parent10a6a01271053053c64077fee56d0cb8444123b6 (diff)
downloadChibiOS-eb7a1a15b23341693864c6fc13ac5eab5c1d6122.tar.gz
ChibiOS-eb7a1a15b23341693864c6fc13ac5eab5c1d6122.tar.bz2
ChibiOS-eb7a1a15b23341693864c6fc13ac5eab5c1d6122.zip
Removed 2nd parameter to assertion and check macros.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6122 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chmtx.c')
-rw-r--r--os/kernel/src/chmtx.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c
index 5f7bdfb8d..0eb02e2b5 100644
--- a/os/kernel/src/chmtx.c
+++ b/os/kernel/src/chmtx.c
@@ -98,7 +98,7 @@
*/
void chMtxObjectInit(mutex_t *mp) {
- chDbgCheck(mp != NULL, "chMtxInit");
+ chDbgCheck(mp != NULL);
queue_init(&mp->m_queue);
mp->m_owner = NULL;
@@ -135,7 +135,7 @@ void chMtxLockS(mutex_t *mp) {
thread_t *ctp = currp;
chDbgCheckClassS();
- chDbgCheck(mp != NULL, "chMtxLockS");
+ chDbgCheck(mp != NULL);
/* Is the mutex already locked? */
if (mp->m_owner != NULL) {
@@ -194,8 +194,8 @@ void chMtxLockS(mutex_t *mp) {
/* It is assumed that the thread performing the unlock operation assigns
the mutex to this thread.*/
- chDbgAssert(mp->m_owner == ctp, "chMtxLockS(), #1", "not owner");
- chDbgAssert(ctp->p_mtxlist == mp, "chMtxLockS(), #2", "not owned");
+ chDbgAssert(mp->m_owner == ctp, "not owner");
+ chDbgAssert(ctp->p_mtxlist == mp, "not owned");
}
else {
/* It was not owned, inserted in the owned mutexes list.*/
@@ -253,7 +253,7 @@ bool chMtxTryLock(mutex_t *mp) {
bool chMtxTryLockS(mutex_t *mp) {
chDbgCheckClassS();
- chDbgCheck(mp != NULL, "chMtxTryLockS");
+ chDbgCheck(mp != NULL);
if (mp->m_owner != NULL)
return false;
@@ -280,12 +280,8 @@ mutex_t *chMtxUnlock(void) {
chSysLock();
- chDbgAssert(ctp->p_mtxlist != NULL,
- "chMtxUnlock(), #1",
- "owned mutexes list empty");
- chDbgAssert(ctp->p_mtxlist->m_owner == ctp,
- "chMtxUnlock(), #2",
- "ownership failure");
+ chDbgAssert(ctp->p_mtxlist != NULL, "owned mutexes list empty");
+ chDbgAssert(ctp->p_mtxlist->m_owner == ctp, "ownership failure");
/* Removes the top mutex from the thread's owned mutexes list and marks it
as not owned.*/
@@ -344,12 +340,8 @@ mutex_t *chMtxUnlockS(void) {
mutex_t *ump, *mp;
chDbgCheckClassS();
- chDbgAssert(ctp->p_mtxlist != NULL,
- "chMtxUnlockS(), #1",
- "owned mutexes list empty");
- chDbgAssert(ctp->p_mtxlist->m_owner == ctp,
- "chMtxUnlockS(), #2",
- "ownership failure");
+ chDbgAssert(ctp->p_mtxlist != NULL, "owned mutexes list empty");
+ chDbgAssert(ctp->p_mtxlist->m_owner == ctp, "ownership failure");
/* Removes the top mutex from the owned mutexes list and marks it as not
owned.*/