This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Semaphores in libc
- From: "Paulo J. Matos" <pocmatos at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Thu, 31 Dec 2009 11:38:12 +0000
- Subject: Semaphores in libc
Hi all,
I am trying to find a solution for the following problem: I have a
code region in C that should only be accessed by one process at a
time. I have basically multiple instances of this program running but
that bit of code, only one of the instances can be running it at that
point.
Everywhere I look I seem to find solutions for thread-based software
etc, which is not this case.
I thought a mutex should do it but I can't find the bit of the manual
that actually confirms mutexes are the way to go.
Any pointers?
Thanks,
--
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net