git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7719 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
Giovanni Di Sirio 2015-03-06 16:17:41 +00:00
parent 0678da6352
commit 9a77cde34e
4 changed files with 9 additions and 7 deletions

View File

@ -93,7 +93,8 @@ void chThdRelease(thread_t *tp) {
chSysLock();
chDbgAssert(tp->p_refs > 0, "not referenced");
refs = --tp->p_refs;
tp->p_refs--;
refs = tp->p_refs;
chSysUnlock();
/* If the references counter reaches zero and the thread is in its

View File

@ -81,9 +81,9 @@ ROMCONST chdebug_t ch_debug = {
{'m', 'a', 'i', 'n'},
(uint8_t)0,
(uint8_t)sizeof (chdebug_t),
(uint16_t)((CH_KERNEL_MAJOR << 11) |
(CH_KERNEL_MINOR << 6) |
(CH_KERNEL_PATCH << 0)),
(uint16_t)(((unsigned)CH_KERNEL_MAJOR << 11U) |
((unsigned)CH_KERNEL_MINOR << 6U) |
((unsigned)CH_KERNEL_PATCH << 0U)),
(uint8_t)sizeof (void *),
(uint8_t)sizeof (systime_t),
(uint8_t)sizeof (thread_t),

View File

@ -304,7 +304,6 @@ static void wakeup(void *p) {
(void) queue_dequeue(tp);
break;
default:
chDbgAssert(false, "unexpected state");
break;
}
tp->p_u.rdymsg = MSG_TIMEOUT;

View File

@ -219,7 +219,8 @@ thread_t *chThdCreateStatic(void *wsp, size_t size,
#endif
chSysLock();
chSchWakeupS(tp = chThdCreateI(wsp, size, prio, pf, arg), MSG_OK);
tp = chThdCreateI(wsp, size, prio, pf, arg);
chSchWakeupS(tp, MSG_OK);
chSysUnlock();
return tp;
@ -331,7 +332,8 @@ void chThdSleep(systime_t time) {
void chThdSleepUntil(systime_t time) {
chSysLock();
if ((time -= chVTGetSystemTimeX()) > 0) {
time -= chVTGetSystemTimeX();
if (time > 0U) {
chThdSleepS(time);
}
chSysUnlock();