diff options
Diffstat (limited to 'os/common/oslib/src/chmboxes.c')
-rw-r--r-- | os/common/oslib/src/chmboxes.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/os/common/oslib/src/chmboxes.c b/os/common/oslib/src/chmboxes.c index 8e543bf4d..5f2f9b6a3 100644 --- a/os/common/oslib/src/chmboxes.c +++ b/os/common/oslib/src/chmboxes.c @@ -84,15 +84,15 @@ *
* @init
*/
-void chMBObjectInit(mailbox_t *mbp, msg_t *buf, cnt_t n) {
+void chMBObjectInit(mailbox_t *mbp, msg_t *buf, size_t n) {
- chDbgCheck((mbp != NULL) && (buf != NULL) && (n > (cnt_t)0));
+ chDbgCheck((mbp != NULL) && (buf != NULL) && (n > (size_t)0));
mbp->buffer = buf;
mbp->rdptr = buf;
mbp->wrptr = buf;
mbp->top = &buf[n];
- mbp->cnt = (cnt_t)0;
+ mbp->cnt = (size_t)0;
mbp->reset = false;
chThdQueueObjectInit(&mbp->qw);
chThdQueueObjectInit(&mbp->qr);
@@ -137,7 +137,7 @@ void chMBResetI(mailbox_t *mbp) { mbp->wrptr = mbp->buffer;
mbp->rdptr = mbp->buffer;
- mbp->cnt = (cnt_t)0;
+ mbp->cnt = (size_t)0;
mbp->reset = true;
chThdDequeueAllI(&mbp->qw, MSG_RESET);
chThdDequeueAllI(&mbp->qr, MSG_RESET);
@@ -162,11 +162,11 @@ void chMBResetI(mailbox_t *mbp) { *
* @api
*/
-msg_t chMBPost(mailbox_t *mbp, msg_t msg, systime_t timeout) {
+msg_t chMBPostTimeout(mailbox_t *mbp, msg_t msg, systime_t timeout) {
msg_t rdymsg;
chSysLock();
- rdymsg = chMBPostS(mbp, msg, timeout);
+ rdymsg = chMBPostTimeoutS(mbp, msg, timeout);
chSysUnlock();
return rdymsg;
@@ -191,7 +191,7 @@ msg_t chMBPost(mailbox_t *mbp, msg_t msg, systime_t timeout) { *
* @sclass
*/
-msg_t chMBPostS(mailbox_t *mbp, msg_t msg, systime_t timeout) {
+msg_t chMBPostTimeoutS(mailbox_t *mbp, msg_t msg, systime_t timeout) {
msg_t rdymsg;
chDbgCheckClassS();
@@ -204,7 +204,7 @@ msg_t chMBPostS(mailbox_t *mbp, msg_t msg, systime_t timeout) { }
/* Is there a free message slot in queue? if so then post.*/
- if (chMBGetFreeCountI(mbp) > (cnt_t)0) {
+ if (chMBGetFreeCountI(mbp) > (size_t)0) {
*mbp->wrptr++ = msg;
if (mbp->wrptr >= mbp->top) {
mbp->wrptr = mbp->buffer;
@@ -251,7 +251,7 @@ msg_t chMBPostI(mailbox_t *mbp, msg_t msg) { }
/* Is there a free message slot in queue? if so then post.*/
- if (chMBGetFreeCountI(mbp) > (cnt_t)0) {
+ if (chMBGetFreeCountI(mbp) > (size_t)0) {
*mbp->wrptr++ = msg;
if (mbp->wrptr >= mbp->top) {
mbp->wrptr = mbp->buffer;
@@ -287,11 +287,11 @@ msg_t chMBPostI(mailbox_t *mbp, msg_t msg) { *
* @api
*/
-msg_t chMBPostAhead(mailbox_t *mbp, msg_t msg, systime_t timeout) {
+msg_t chMBPostAheadTimeout(mailbox_t *mbp, msg_t msg, systime_t timeout) {
msg_t rdymsg;
chSysLock();
- rdymsg = chMBPostAheadS(mbp, msg, timeout);
+ rdymsg = chMBPostAheadTimeoutS(mbp, msg, timeout);
chSysUnlock();
return rdymsg;
@@ -316,7 +316,7 @@ msg_t chMBPostAhead(mailbox_t *mbp, msg_t msg, systime_t timeout) { *
* @sclass
*/
-msg_t chMBPostAheadS(mailbox_t *mbp, msg_t msg, systime_t timeout) {
+msg_t chMBPostAheadTimeoutS(mailbox_t *mbp, msg_t msg, systime_t timeout) {
msg_t rdymsg;
chDbgCheckClassS();
@@ -329,7 +329,7 @@ msg_t chMBPostAheadS(mailbox_t *mbp, msg_t msg, systime_t timeout) { }
/* Is there a free message slot in queue? if so then post.*/
- if (chMBGetFreeCountI(mbp) > (cnt_t)0) {
+ if (chMBGetFreeCountI(mbp) > (size_t)0) {
if (--mbp->rdptr < mbp->buffer) {
mbp->rdptr = mbp->top - 1;
}
@@ -376,7 +376,7 @@ msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg) { }
/* Is there a free message slot in queue? if so then post.*/
- if (chMBGetFreeCountI(mbp) > (cnt_t)0) {
+ if (chMBGetFreeCountI(mbp) > (size_t)0) {
if (--mbp->rdptr < mbp->buffer) {
mbp->rdptr = mbp->top - 1;
}
@@ -412,11 +412,11 @@ msg_t chMBPostAheadI(mailbox_t *mbp, msg_t msg) { *
* @api
*/
-msg_t chMBFetch(mailbox_t *mbp, msg_t *msgp, systime_t timeout) {
+msg_t chMBFetchTimeout(mailbox_t *mbp, msg_t *msgp, systime_t timeout) {
msg_t rdymsg;
chSysLock();
- rdymsg = chMBFetchS(mbp, msgp, timeout);
+ rdymsg = chMBFetchTimeoutS(mbp, msgp, timeout);
chSysUnlock();
return rdymsg;
@@ -441,7 +441,7 @@ msg_t chMBFetch(mailbox_t *mbp, msg_t *msgp, systime_t timeout) { *
* @sclass
*/
-msg_t chMBFetchS(mailbox_t *mbp, msg_t *msgp, systime_t timeout) {
+msg_t chMBFetchTimeoutS(mailbox_t *mbp, msg_t *msgp, systime_t timeout) {
msg_t rdymsg;
chDbgCheckClassS();
@@ -454,7 +454,7 @@ msg_t chMBFetchS(mailbox_t *mbp, msg_t *msgp, systime_t timeout) { }
/* Is there a message in queue? if so then fetch.*/
- if (chMBGetUsedCountI(mbp) > (cnt_t)0) {
+ if (chMBGetUsedCountI(mbp) > (size_t)0) {
*msgp = *mbp->rdptr++;
if (mbp->rdptr >= mbp->top) {
mbp->rdptr = mbp->buffer;
@@ -501,7 +501,7 @@ msg_t chMBFetchI(mailbox_t *mbp, msg_t *msgp) { }
/* Is there a message in queue? if so then fetch.*/
- if (chMBGetUsedCountI(mbp) > (cnt_t)0) {
+ if (chMBGetUsedCountI(mbp) > (size_t)0) {
*msgp = *mbp->rdptr++;
if (mbp->rdptr >= mbp->top) {
mbp->rdptr = mbp->buffer;
|