apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@betaversion.org>
Subject Re: cvs commit: apr/dso/unix dso.c
Date Mon, 25 Mar 2002 23:07:49 GMT
"Aaron Bannert" <aaron@clove.org> wrote:

> Can't really tell from that. Anyone else know what threading library
> Darwin uses?

It _looks_ (I'm not implying it does), that it's using a some sort of
OSF/MkLinux thing... In pthread.h, this is what I found:

/*
 * Copyright 1996 1995 by Open Software Foundation, Inc. 1997 1996 [...]
[...]
 * MkLinux
 */
[...]

Weirrrrrdddddd.... 

> Just an FYI: apr_lock is going away and should not be used. apr_proc_mutex
> is a split-out of the interprocess parts of apr_lock.

I know (thanks David for trying to make me understand what was going on! :)
The story doesn't change...

>> On Darwin semget and semctl are there, but there is no SEM_UNDO, the
>> pthread_mutexattr_setpshared (of course) is not there, but I'm wondering if
>> there's another way to handle things without using files, which just is a
>> kick in the **** :)
> 
> I dunno, don't have a darwin box. :)

You're more than welcome to borrow an account on one of my OS/X 10.1.3
boxes... :)

>> This is also because (apart from speed) most of the file paths in HTTPD are
>> "hard coded" (check this as an example):
>> 
>> # grep 'logs/.*lock' `find $HTTPD2_SRC/server/mpm -type f`
>> ../netware/mpm_default.h:  #define DEFAULT_LOCKFILE "logs/accept.lock"
>> ../perchild/mpm_default.h:#define DEFAULT_LOCKFILE "logs/accept.lock"
>> ../prefork/mpm_default.h:#define DEFAULT_LOCKFILE "logs/accept.lock"
>> ../worker/mpm_default.h:#define DEFAULT_LOCKFILE "logs/accept.lock"
>> 
>> DOH! :) I don't have the "logs" directory in my HTTPD 2.0 install (took me
>> ages to figure that out!)
> 
> Yeah, that's definately broken. Those should be defined in autoconf
> to at least be relative to the $runtimedir.

I know, and "complained" politely already on dev@httpd :) Someone was
supposed to come up with a patch :)

> The question is if APR can support semaphores to be used as mutexes w/o
> SEM_UNDO, and if it can will it be safe?

Yessir :) Or use the set of sem_... functions (but I believe Jim already
replied to that)...

> BTW, what does `grep SERIALIZE include/apr.h` produce on your darwin box?

Usual stuff... Lot's a 0s and some 1s (but all in the wrong places! :)

#define APR_USE_FLOCK_SERIALIZE           0
#define APR_USE_SYSVSEM_SERIALIZE         0
#define APR_USE_FCNTL_SERIALIZE           1
#define APR_USE_PROC_PTHREAD_SERIALIZE    0
#define APR_USE_PTHREAD_SERIALIZE         1

#define APR_HAS_FLOCK_SERIALIZE           1
#define APR_HAS_SYSVSEM_SERIALIZE         0
#define APR_HAS_FCNTL_SERIALIZE           1
#define APR_HAS_PROC_PTHREAD_SERIALIZE    0
#define APR_HAS_RWLOCK_SERIALIZE          0

    Pier


Mime
View raw message