[Lazarus] semaphores

waldo kitty wkitty42 at windstream.net
Wed Feb 8 19:56:23 CET 2012


On 2/8/2012 07:52, Antonio Fortuny wrote:
> Hi all.
>
> I need to implement a system wide locking system in all WIn32, Win64, Linux32
> and Linux64. Therefore I need some king of named locking objects.
> For Windows I can use mutexes. For Linex I can only use sem_t structures managed
> by a series of functions in pthrlinux.inc but they are unnamed which means that
> they are only usable inside a multi-treaded process and not system wide.
> Something else I miss ?

the old school simple solution is to just use a file... no need to get fancy... 
if the file exists or not is all you need to worry about :)




More information about the Lazarus mailing list