Fixed bug #1093.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_20.3.x@13633 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
3a5fa1541a
commit
f05ba07aaa
|
@ -145,7 +145,6 @@ void chSemResetWithMessage(semaphore_t *sp, cnt_t n, msg_t msg) {
|
||||||
* @iclass
|
* @iclass
|
||||||
*/
|
*/
|
||||||
void chSemResetWithMessageI(semaphore_t *sp, cnt_t n, msg_t msg) {
|
void chSemResetWithMessageI(semaphore_t *sp, cnt_t n, msg_t msg) {
|
||||||
cnt_t cnt;
|
|
||||||
|
|
||||||
chDbgCheckClassI();
|
chDbgCheckClassI();
|
||||||
chDbgCheck((sp != NULL) && (n >= (cnt_t)0));
|
chDbgCheck((sp != NULL) && (n >= (cnt_t)0));
|
||||||
|
@ -153,9 +152,8 @@ void chSemResetWithMessageI(semaphore_t *sp, cnt_t n, msg_t msg) {
|
||||||
((sp->cnt < (cnt_t)0) && queue_notempty(&sp->queue)),
|
((sp->cnt < (cnt_t)0) && queue_notempty(&sp->queue)),
|
||||||
"inconsistent semaphore");
|
"inconsistent semaphore");
|
||||||
|
|
||||||
cnt = sp->cnt;
|
|
||||||
sp->cnt = n;
|
sp->cnt = n;
|
||||||
while (++cnt <= (cnt_t)0) {
|
while (queue_notempty(&sp->queue)) {
|
||||||
chSchReadyI(queue_lifo_remove(&sp->queue))->u.rdymsg = msg;
|
chSchReadyI(queue_lifo_remove(&sp->queue))->u.rdymsg = msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,10 @@
|
||||||
*** Releases and Change Log ***
|
*** Releases and Change Log ***
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
|
*** 20.3.2 ***
|
||||||
|
- FIX: Fixed failure in chSemReset() function when counter is equal to MAXINT
|
||||||
|
(bug #1093).
|
||||||
|
|
||||||
*** 20.3.1 ***
|
*** 20.3.1 ***
|
||||||
- NEW: STM32 ICU driver now allows to setup the ARR register in the
|
- NEW: STM32 ICU driver now allows to setup the ARR register in the
|
||||||
configuration structure, the default value should be 0xFFFFFFFFU.
|
configuration structure, the default value should be 0xFFFFFFFFU.
|
||||||
|
|
Loading…
Reference in New Issue