ARMmbed / mbed-events

DEPRECATED! This project has moved to mbed-os
https://github.com/ARMmbed/mbed-os/tree/master/events
Apache License 2.0
11 stars 6 forks source link

events - Fixed overflow of timeout on STM32F4 #27

Open geky opened 7 years ago

geky commented 7 years ago

For equeue_sema_wait, -1 is used to indicate an infinite wait. This wasn't handled in the nonrtos implementation and caused undefined/weird behaviour after an overflow on integer multiplication.

On most boards, the infinite wait would return after ~50 days, on the STM32F4 the timeout killed all other timeouts for some reason.

tested on NUCLEO_F401RE mirrored on https://github.com/ARMmbed/mbed-os/pull/3550