You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Cliff Woolley <jw...@virginia.edu> on 2003/07/20 20:28:31 UTC

Re: cvs commit: apr/memory/unix apr_pools.c

On Fri, 18 Jul 2003 striker@apache.org wrote:

>   ===================================================================
>   RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
>   retrieving revision 1.196
>   retrieving revision 1.197
>   diff -u -r1.196 -r1.197
>   --- apr_pools.c	28 May 2003 04:39:42 -0000	1.196
>   +++ apr_pools.c	18 Jul 2003 23:10:04 -0000	1.197
>   @@ -856,7 +856,7 @@
>    #if APR_HAS_THREADS
>            apr_thread_mutex_t *mutex;
>
>   -        if ((mutex = apr_allocator_mutex_get(allocator)) != NULL)
>   +        if ((mutex = apr_allocator_mutex_get(parent->allocator)) != NULL)
>                apr_thread_mutex_lock(mutex);
>    #endif /* APR_HAS_THREADS */

Yes, definitely correct.

Though what about line 864, which says:

    pool->sibling->ref = &pool->sibling;

Are the pool->sibling pointers uniformly protected by the pool->parent
mutex?  I haven't investigated all of the implications yet, but it seems
like that might cause problems as well.

--Cliff

RE: cvs commit: apr/memory/unix apr_pools.c

Posted by Sander Striker <st...@apache.org>.
> From: Cliff Woolley [mailto:jwoolley@virginia.edu]
> Sent: Sunday, July 20, 2003 8:29 PM

[...]
> Are the pool->sibling pointers uniformly protected by the pool->parent
> mutex?

Yes.  The child pools are in a singly linked list, which head is pool->child.

> I haven't investigated all of the implications yet, but it seems
> like that might cause problems as well.

When?


Sander