httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hyde <>
Subject Re: Removing ap_dummy_mutex from API
Date Fri, 02 Oct 1998 02:06:02 GMT

Roy T. Fielding writes:
>>This removes the global ap_dummy_mutex used in multithread.h
>I couldn't figure out from your description why this was necessary.
>Could you explain?  Just a short note -- I am mostly curious because
>I'm not sure what it was doing there in the first place.

In the first place?  Well on unix the mutex calls are all no-ops,
but create_mutex has to return something.  For reasons lost in
the mists of time the original author wrote that.  It's a clever
cliche for getting a unique value, but I don't see any reason
for it.  It just creates a lot of lines of code mentioning 
the symbol that amount to nothing.

Necessary? no but why I care...

I've been writting little applications of various sorts that
use alloc.c and buff.c.  These are fun and show that there
is almost a nice little "server" toolkit hidden in the apache

I currently have a file I call stubs.c that defines assorted
things so I can link.  The file illustrates how the layering of
the code isn't perfect.   It's pretty good, but just a little
short of perfect.

There are three problems in there.  

1. libab is dependent ap_log_error because of ap_slack.
2. the stack/interrupt stuff is all in http_main.  Linker
   doesn't like that since alloc wants to use ap_block_alarms.
   In the longer term I don't like it since the stack/interrupt
   stuff is really very low level and ought to be in it's own
3. This silly ap_dummy_mutex thing.

 - ben hyde

View raw message