[Lazarus] semaphores

Henry Vermaak henry.vermaak at gmail.com
Tue Feb 14 11:40:58 CET 2012


On 14/02/12 08:43, Antonio Fortuny wrote:
>
> Linux ?
> I'm still looking for a solution equivalent to the Windows mutexes.

You can do this by storing the mutex in shared memory and accessing that 
shared memory from different programs.  You have to set the mutex as 
recursive and shared (using pthread_mutexattr_setpshared).  Look into 
the pthread man pages for info.  I believe there's an example somewhere 
in the glibc sources, too.

Henry




More information about the Lazarus mailing list