httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: mutex in palloc
Date Thu, 11 Dec 1997 10:06:07 GMT
Ben Hyde wrote:
> > >> >Ben Hyde wrote:
> > >> >> Is the critical region in palloc so narrow
> > >> >> because allocation in a given pool is never
> > >> >> done by more than a single thread?
> Ok so Dean's awnser to my original question is:   yes
> Ben L's awnser is:  "seems like a rash assumption".

I'm quite happy to go along with Dean, but my reply still stands. If we
are going to do this, it must be made clear that its what we are doing.
Assuming that people will guess correctly still seems rash to me.

> I asked since it tells me a lot about the overall structure
> of things.  Not that my opinion counts for much here abouts
> but I was expecting Dean's awnser since I currently
> think the pool is THE thread specific data structure and
> any attempt to share makes me confused.
> Those wild and crazy module authors.  An assert that
> "expected" thread is doing the allocate comes to mind.

Sounds like a good idea. Budding NT patch authors should note, though,
that the obvious way of doing this gets you a handle that is the same
for every thread (really).

> I don't pretend to be any kind of an NT expert but
> EnterCriticalSection appears to be a better substrate
> for acquire_mutex et. al.

You are probably right - I haven't looked at the low-level stuff in
detail, yet.



Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|
and Technical Director|Email: |Apache-SSL author
A.L. Digital Ltd,     |
London, England.      |"Apache: TDG"

View raw message