On 2020-08-13 07:42, Sven Barth via fpc-pascal wrote:
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.

Well, there's the functionality related to events (= event semaphores) - BasicEvent* / RTLEvent*, and there's also the functionality of critical sections (*CriticalSection) which is basically a mutex semaphore. Obviously, that doesn't contradict the intention to provide the functionality in SyncObjs in Delphi compatible way.

Tomas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to