apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: [PATCH] Strawman at fixing disjoint process locking
Date Fri, 04 Jun 2004 15:10:46 GMT
--On Friday, June 4, 2004 9:58 AM -0400 rbb@rkbloom.net wrote:

> You don't need apr_*_mutex_join, that is what apr_*_mutex_child_init is
> supposed to do, but it can't, because the API doesn't work.  The simple
> fact that you needed to insert a new method to do exactly what an existing
> method does proves that the API is currently broken.

I think we disagree on what child_init should do then.  I think child_init 
should work when there is a shared address space.  And, a proposed _join could 
work when the address space is disjoint, but there is still a parent-child 
relationship.  I don't see why their functionality must be conflated.  And, 
certainly, _create shouldn't be called twice (which is what testglobalmutex 
was doing) - that would never work correctly as there needs to be only one 
owner to the lock.

> Now, the reason that this patch doesn't actually fix the problem is that
> you haven't read my post about how to solve this problem.  Some mutex
> types can't be shared without using fork.  Unless you take that into
> account, your fix isn't correct.

Yes, I read your earlier posts but they made no sense to me.  Even with my 
strawman patch, all of them would still require the use of fork for now.  If 
we wanted to relax that distinction, then we'd have to stop using anonymous 
shared memory segments (like via IPC_PRIVATE).  Yet, even if we did that, I 
think the API itself (with the perhaps addition of _join) would be sufficient. 
The fact we use tactics like IPC_PRIVATE are an implementation detail.  (I'm 
not sure it's worth adding this functionality though.)

> However, my free time just went to hell in a handbasket, so even my
> answering this post is something I really shouldn't have done.

Hah.  Congratulations.  ;-)  -- justin

View raw message