This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]