Lab-Project-FreeRTOS-POSIX icon indicating copy to clipboard operation
Lab-Project-FreeRTOS-POSIX copied to clipboard

sem_timedwait always decrements semaphore value

Open fdgonthier opened this issue 2 years ago • 1 comments

On entering the sem_timedwait function the semaphore value is (correctly?) decremented but it is never reset to its original value when xSemaphoreTake returns a timeout. In my case, this means that in a loop where sem_timedwait is called with a timeout, the value of the semaphore keeps getting more negative.

A patch is forthcoming as I need this to work.

fdgonthier avatar Jan 10 '23 13:01 fdgonthier

@fdgonthier : Did you ever get this working as expected? We would greatly appreciate a patch if so.

paulbartell avatar Mar 13 '23 19:03 paulbartell