mirror of https://github.com/rusefi/ChibiOS.git
Fixed bug #865.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10336 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
b693c748d5
commit
b263680b98
|
@ -294,11 +294,11 @@ msg_t chSemWaitTimeoutS(semaphore_t *sp, systime_t time) {
|
|||
void chSemSignal(semaphore_t *sp) {
|
||||
|
||||
chDbgCheck(sp != NULL);
|
||||
|
||||
chSysLock();
|
||||
chDbgAssert(((sp->cnt >= (cnt_t)0) && queue_isempty(&sp->queue)) ||
|
||||
((sp->cnt < (cnt_t)0) && queue_notempty(&sp->queue)),
|
||||
"inconsistent semaphore");
|
||||
|
||||
chSysLock();
|
||||
if (++sp->cnt <= (cnt_t)0) {
|
||||
chSchWakeupS(queue_fifo_remove(&sp->queue), MSG_OK);
|
||||
}
|
||||
|
@ -379,14 +379,14 @@ msg_t chSemSignalWait(semaphore_t *sps, semaphore_t *spw) {
|
|||
msg_t msg;
|
||||
|
||||
chDbgCheck((sps != NULL) && (spw != NULL));
|
||||
|
||||
chSysLock();
|
||||
chDbgAssert(((sps->cnt >= (cnt_t)0) && queue_isempty(&sps->queue)) ||
|
||||
((sps->cnt < (cnt_t)0) && queue_notempty(&sps->queue)),
|
||||
"inconsistent semaphore");
|
||||
chDbgAssert(((spw->cnt >= (cnt_t)0) && queue_isempty(&spw->queue)) ||
|
||||
((spw->cnt < (cnt_t)0) && queue_notempty(&spw->queue)),
|
||||
"inconsistent semaphore");
|
||||
|
||||
chSysLock();
|
||||
if (++sps->cnt <= (cnt_t)0) {
|
||||
chSchReadyI(queue_fifo_remove(&sps->queue))->u.rdymsg = MSG_OK;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** Next ***
|
||||
- RT: Fixed misplaced assertion in semaphores code (bug #865)(backported to
|
||||
17.6.1 and 16.1.9).
|
||||
- HAL: Fixed STM32 USBv1 fails the state check when USB_USE_WAIT is TRUE
|
||||
(bug #863)(backported to 17.6.1 and 16.1.9).
|
||||
- HAL: Fixed incorrect OTG stepping in STM32F412 registry (bug #861)
|
||||
|
|
Loading…
Reference in New Issue