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]

Re: Semaphores in libc


On Thu, Dec 31, 2009 at 11:38:12AM +0000, Paulo J. Matos wrote:
> 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.

POSIX semaphores, do: man sem_overview.

-- 
lfr
0/0

Attachment: pgp00000.pgp
Description: PGP signature


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