httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/modules/mpm/winnt winnt.c
Date Tue, 12 Oct 1999 09:05:37 GMT
Dean Gaudet wrote:
> 
> On Tue, 12 Oct 1999, Greg Stein wrote:
> 
> > manoj@hyperreal.org wrote:
> > >
> > > manoj       99/10/11 23:14:47
> > >
> > >   Modified:    src/lib/apr/file_io/os2 filedup.c open.c pipe.c
> > >                src/lib/apr/file_io/unix dir.c filedup.c open.c
> > >                src/lib/apr/file_io/win32 dir.c filedup.c
> > >                src/lib/apr/locks/beos crossproc.c intraproc.c
> > >                src/lib/apr/locks/unix crossproc.c intraproc.c
> > >                src/lib/apr/misc/win32 start.c
> > >                src/modules/mpm/winnt winnt.c
> > >   Log:
> > >   Make sure to use ap_null_cleanup instead of NULL when setting an empty
> > >   child_cleanup.
> >
> > This seems a bit silly. Why can't we just test for NULL in the register
> > function and substitute ap_null_cleanup? Why must everybody know about
> > and use ap_null_cleanup? Why push the requirement of that extra bit of
> > knowledge on them? Personally, using NULL is much clearer from the
> > "client" side of the cleanup registration.
> 
> testing for NULL costs cycles.  using ap_null_cleanup doesn't.  it's a
> matter of principle i guess...  compile-time versus run-time.

A test for NULL seems a lot cheaper than a function call. If we have to
call ap_null_cleanup, then yes... it is an extra test at cleanup
registration time. I'd still be willing to pay it (it isn't much), but
then again I won't be bent out of shape if I must use ap_null_cleanup.

Cheers,
-g

--
Greg Stein, http://www.lyra.org/

Mime
View raw message