A mutex for inter-process ;-)

Daniel Eischen deischen at freebsd.org
Mon Mar 30 14:22:55 PDT 2009


On Mon, 30 Mar 2009, Randall Stewart wrote:

> Hi all:
>
> I have recently written a small set of routines that allow
> two process to have a "mutex" between them.. actually it allows
> all of the threads in any set of processes to have mutexes between themselves 
> ;-)
>
> Anyway it seems to be working fairly well.. I still have to write a man page
> for it (documentation always last).. and eventually I would like to port in
> some of the WITNESS type features since the mutex's have names..
>
> I probably should also think about scaling it up a bit.. right now its really
> more for a small scale (100 or less mutexes)...
>
> Who should I talk to about getting this in... having it reviewed etc. I think
> it belongs in libthr since it really needs the tid of the pthreads from the
> pthread_t type... and for now I have a horrible hack in to get it ;-)

The real way to do this is to support PTHREAD_PROCESS_SHARED
mutexes within our normal mutex, and to change our current
mutex (and cv) types to be structs instead of pointers.
The current API, other than the type change, shouldn't
change at all.

-- 
DE


More information about the freebsd-threads mailing list