Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2009 19:30:47 -0400
From:      Randall Stewart <rrs@lakerest.net>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        threads@freebsd.org
Subject:   Re: A mutex for inter-process ;-)
Message-ID:  <AC6F7359-28D5-4F92-93AF-43B6AF86FC01@lakerest.net>
In-Reply-To: <Pine.GSO.4.64.0903301719000.2318@sea.ntplx.net>
References:  <7D4F6788-0F12-4863-9635-7FADA9115D16@lakerest.net> <Pine.GSO.4.64.0903301719000.2318@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mar 30, 2009, at 5:22 PM, Daniel Eischen wrote:

> 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.


So how do you propose to name the mutex's so that two disparate
process can locate the same mutex?

I don't see how a pthread_mutex can suffice... we need more than
just the current mutex...

What am I missing?

R




>
>
> -- 
> DE
>

------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC6F7359-28D5-4F92-93AF-43B6AF86FC01>