httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chia-liang Kao <cl...@CirX.ORG>
Subject Re: need ap_initialize() before create_process()->...->lock_inter()->semop()
Date Wed, 23 Feb 2000 17:11:47 GMT
IMHO, the ap_initialize() problem is the dependencies between various
initialization procedures. At a glance, ap_initialize is not only
suppose to do the lock related setup, but also some other in other
platforms, which might need to be called after some initializations like
create_process, etc. (or in the future, just guess, may need ap_alloc_init 
first somehow)

I would suggest:
1. Clarify what kind of initialization will ap_initialize() do
2. Make each component as self-initialized as possible.

For example, if sembuf and struct flock is always in that order in 
all platform, we could just statically fill op_on/op_off/lock_it/unlock_it
and elimate setup_lock().

On Wed, Feb 23, 2000 at 10:46:35AM -0500, Bill Stoddard wrote:
> > Basically, ap_initialize() needs to get called before create_process(),
> > since create_process() passes op_on structure to semop() to get a lock,
> but
> > op_on isn't initialized until ap_initialize() calls setup_lock().  Here is
> > a slight rearrangement to main() which calls ap_initialize() earlier...
> >
> Just committed this patch. A couple of suggestions...  Most folks on the
> list prefer unified diffs (diff -u ). They are easier to read. Also, notice
> the patch you posted has line wraps in it. Not good for patches, if you want
> them to apply :-).  I (and a few other folks on the list) have had mixed
> success posting patches with Lotus Notes. FYI...

View raw message