apr-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: apr/test aprtest.dsp
Date Tue, 11 Sep 2001 00:57:33 GMT
On Mon, Sep 10, 2001 at 10:53:59PM -0000, rbb@apache.org wrote:
> rbb         01/09/10 15:53:59
> 
>   Modified:    .        apr.dsp
>                include/arch/win32 thread_mutex.h
>                locks/win32 thread_mutex.c
>                test     aprtest.dsp
>   Log:
>   Add the new thread_mutex API to the Windows build.  This works on
>   my Windows box, but I am using MSVC 7, so my computer doesn't use
>   project files anymore.  The C code is good, but somebody may have
>   to hack the project files to make it all compile.  This passes the
>   first half of the testlock test.  The second half is for read/write
>   locks, which I will be implementing next.
>...
>    APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
>                                                      apr_pool_t *pool)
>    {
>   -    return APR_ENOTIMPL;
>   +    SECURITY_ATTRIBUTES sec;
>   +    (*mutex) = (apr_thread_mutex_t *)apr_palloc(pool, sizeof(**mutex));
>   +
>   +    (*mutex)->pool = pool;
>   +    sec.nLength = sizeof(SECURITY_ATTRIBUTES);
>   +    sec.lpSecurityDescriptor = NULL;
>   +    sec.bInheritHandle = FALSE;
>   +
>   +    InitializeCriticalSection(&(*mutex)->section);
>   +    apr_pool_cleanup_register((*mutex)->pool, (*mutex), thread_mutex_cleanup,
>   +                              apr_pool_cleanup_null);
>   +    return APR_SUCCESS;
>    }

"sec" is unused. All that can stuff can go...

Cheers,
-g

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

Mime
View raw message