freemint / mintlib

libc variant for TOS and FreeMiNT OS
GNU General Public License v2.0
22 stars 10 forks source link

Semaphore: broken implementation. #81

Open MedourMehdi opened 5 days ago

MedourMehdi commented 5 days ago

Hi,

I haven't found time to test semaphore's functions.

A quick test of sample3 show broken behavior, the program get stuck under Freemint. Replacing by "./semaphore.h" fixes the issue.

Please consider testing the semaphore examples I've already provided before. Those examples were tested under linux/osx and freemint in order to validate same behavior on both environment.

Attached those examples and a working one header semaphore implementation. sample2.cpp.zip sample3.cpp.zip semaphore.h.zip

MedourMehdi commented 4 days ago

I've more clue: If you use example3, and select more consumers than producers (producers:2, consumers:3, buffer:128) then current mintlib implementation get stuked. It works as expected with the semaphore header attached.