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/lib/apr/time/unix time.c
Date Thu, 07 Oct 1999 01:30:47 GMT
On 6 Oct 1999 rbb@hyperreal.org wrote:
>...
>   +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
>   +#define SAFETY_LOCK(func_name, cnt, name_str) \
>   +    { \
>   +    struct lock_t *funclock = lock_##func_name; \
>   +    if (funclock == NULL) \
>   +        if (ap_create_lock(cnt, APR_MUTEX, APR_LOCKALL, name_str, &funclock) !=
APR_SUCCESS) \
>   +            return APR_NOTTHREADSAFE; \
>   +    if (ap_lock(funclock) != APR_SUCCESS) \
>   +        return APR_NOTTHREADSAFE; \
>   +    }

Euh... it looks like this never stores a value back into lock_##func_name.
Therefore, it will create a lock on every entry to the function.

Also, why are these macros in two places? acconfig.h and apr_config.h.in

Cheers,
-g

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




Mime
View raw message