httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: NSPR/multithreading stuff
Date Thu, 16 Apr 1998 10:43:32 GMT
On Wed, 15 Apr 1998, Mark J Cox wrote:

> The first hack is at http://www.awe.com/~mark/apache/

I took a few hours tonight and did a native linuxthreads port.  But I'm
crashing and burning just like you said you are.  In my case though I'm
convinced that it's my environment -- too many questionable things
installed, I need to start with a redhat 5 based system... I'll try that
later this week. 

Anyhow there's a lot of stuff that you'll need from my patch, because all
the APACHE_TLS stuff, and various other globals in http_main.c are
actually thread/child specific... and gcc doesn't have the
__declspec(thread) support that VC++ does.  See all the tls() stuff in my
patch. 

BTW, gmtime(), localtime(), and ctime() should all be taken out and shot. 
So should ap_get_time().  ap_get_time() is completely thread unsafe. 

http_main should also be taken out and shot. 

MULTITHREAD should be renamed WIN32 everywhere.  It's meaningless -- it's
completely tied to the WIN32 implementation.

multithread.h should be taken out and shot.  acquire_mutex() should *not*
be nestable, that's way too slow.  alloc.c should be taken out and shot
for attempting to nest it.  (This is Ben Hyde's doing :)  I guess I'll
have to implement the full solution we talked about ages ago that removes
the need for the nested acquire_mutex). 

The attached patch is mostly useless.  Unless you've got a redhat 5
system, in which case try building with: 

EXTRA_CFLAGS=-Wall -Wshadow -pipe -fno-common -DTOP_FUEL -DLTHREAD -D_REENTRANT -DDEBUG_SIGSTOP
EXTRA_LDFLAGS=-g -Wl,-Map -Wl,httpd.map
EXTRA_LIBS=-lpthread

Dean


Mime
View raw message