[ntp:questions] new driver development

Hal Murray hal-usenet at ip-64-139-1-69.sjc.megapath.net
Sat Apr 9 16:55:02 UTC 2011

In article <hiUjp.6071$Yl2.1937 at newsfe07.iad>,
 Bruce Lilly <bruce.lilly at gmail.com> writes:

>Mutexes can work across processes; look for pthread_mutexattr_setpshared.


>The first party who needs the mutex (if not already initialized)
>initializes it.  Destruction is another issue.

How do I decide who is first?

>There are a lot of complications (e.g. the mutex (and its attributes)
>typically are mapped to different addresses in different processes).

What happens to a mutex in shared memory if all the processes using
that memory go away?  Does that shared memory stay around, or would
the mutex have to be reinitialized if one of the programs using it
gets restarted?

Is there any way to test to see if a mutex has been initialized?

These are my opinions, not necessarily my employer's.  I hate spam.

More information about the questions mailing list