[fpc-pascal] RTL semaphore supported?

Sven Barth pascaldragon at googlemail.com
Thu Aug 13 07:42:16 CEST 2020


Am 13.08.2020 um 06:36 schrieb Ryan Joseph via fpc-pascal:
> Are semaphores actually supported in the RTL? I don't see they're available on macOS (compiling with trunk even).
>
> https://www.freepascal.org/docs-html/3.0.0/rtl/system/semaphoreinit.html

No, these functions where there only temporary. The RTL functionality 
for semaphores was only ever implemented for *nix systems, but not for 
Windows and was only used internally in the System unit, but even that 
changed some years ago, thus it was decided to remove it.

The way to go with semaphores would be to implement the Delphi 
compatible TSemaphore in the unit SyncObjs.

Regards,
Sven


More information about the fpc-pascal mailing list