Your message to Redhat-devel-list awaits moderator approval

Chen Guojian <[email protected]> Thu, 23 Jun 2005 18:50:33 +0800
Newsgroups gmane.linux.redhat.devel
Message-ID <[email protected]>
Hi,
I want to realize synchronization between mutiple threads in more than
one processes, I learn that  Posix semaphor is supported in Linux 2.6
and can be used in interprocess synchronization.
posix semaphors have operation functions such as sem_open, sem-close,
sem_unlink.

But I also want to use mutex and condition variables, i just know they
can only be used between mutiple threads in the same process, is it
right?

Can you tell me if they are supported  for interprocess
synchronization in linux 2.6 and NPTL now? and how to use them?

bacause pthread_mutex_t and pthread_cond_t variables are defined just
in a process, how can it be seen in anothor process? I know each
semaphor has a name or key to let it expose to all processes, but
mutex and cond vars don't have.

pthread_mutex_setpshared() and pthread_cond_setpshared() could be used?

please help me, a word will be appriciated.