apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr-site/docs/coverage apr_atomic.c.gcov apr_pools.c.gcov apr_snprintf.c.gcov index.html thread.c.gcov thread_mutex.c.gcov
Date Sat, 13 Mar 2004 03:27:09 GMT
rbb         2004/03/12 19:27:09

  Modified:    docs/coverage apr_atomic.c.gcov apr_pools.c.gcov
                        apr_snprintf.c.gcov index.html thread.c.gcov
                        thread_mutex.c.gcov
  Log:
  Update after integrating testatomic into testall.  This affects a large
  amount of the gcov data, because the atomic math tests use threads.
  
  Revision  Changes    Path
  1.2       +55 -55    apr-site/docs/coverage/apr_atomic.c.gcov
  
  Index: apr_atomic.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/apr_atomic.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_atomic.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ apr_atomic.c.gcov	13 Mar 2004 03:27:09 -0000	1.2
  @@ -165,21 +165,21 @@
   		#endif /* APR_HAS_THREADS */
   		
   		apr_status_t apr_atomic_init(apr_pool_t *p)
  -           2    {
  +           3    {
   		#if APR_HAS_THREADS
  -           2        int i;
  -           2        apr_status_t rv;
  -           2        hash_mutex = apr_palloc(p, sizeof(apr_thread_mutex_t*) * NUM_ATOMIC_HASH);
  +           3        int i;
  +           3        apr_status_t rv;
  +           3        hash_mutex = apr_palloc(p, sizeof(apr_thread_mutex_t*) * NUM_ATOMIC_HASH);
   		
  -          16        for (i = 0; i < NUM_ATOMIC_HASH; i++) {
  -          14            rv = apr_thread_mutex_create(&(hash_mutex[i]),
  +          24        for (i = 0; i < NUM_ATOMIC_HASH; i++) {
  +          21            rv = apr_thread_mutex_create(&(hash_mutex[i]),
   		                                     APR_THREAD_MUTEX_DEFAULT, p);
  -          14            if (rv != APR_SUCCESS) {
  +          21            if (rv != APR_SUCCESS) {
         ######               return rv;
   		        }
   		    }
   		#endif /* APR_HAS_THREADS */
  -           2        return APR_SUCCESS;
  +           3        return APR_SUCCESS;
   		}
   		#endif /* !defined(APR_OVERRIDE_ATOMIC_INIT) */
   		
  @@ -200,21 +200,21 @@
   		}
   		#else
   		apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
  -      ######    {
  -      ######        apr_uint32_t old_value;
  +     1600005    {
  +     1600005        apr_uint32_t old_value;
   		
   		#if APR_HAS_THREADS
  -      ######        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  +     1600005        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
   		       
  -      ######        CHECK(apr_thread_mutex_lock(lock));
  -      ######        old_value = *mem;
  -      ######        *mem += val;
  -      ######        CHECK(apr_thread_mutex_unlock(lock));
  +     1600005        CHECK(apr_thread_mutex_lock(lock));
  +     1600005        old_value = *mem;
  +     1600005        *mem += val;
  +     1600005        CHECK(apr_thread_mutex_unlock(lock));
   		#else
   		    old_value = *mem;
   		    *mem += val;
   		#endif /* APR_HAS_THREADS */
  -      ######        return old_value;
  +     1600005        return old_value;
   		}
   		#endif /* defined(APR_OVERRIDE_ATOMIC_CAS32) */
   		#endif /* !defined(APR_OVERRIDE_ATOMIC_ADD32) */
  @@ -232,13 +232,13 @@
   		}
   		#else
   		void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val) 
  -      ######    {
  +           1    {
   		#if APR_HAS_THREADS
  -      ######        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  +           1        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
   		       
  -      ######        CHECK(apr_thread_mutex_lock(lock));
  -      ######        *mem -= val;
  -      ######        CHECK(apr_thread_mutex_unlock(lock));
  +           1        CHECK(apr_thread_mutex_lock(lock));
  +           1        *mem -= val;
  +           1        CHECK(apr_thread_mutex_unlock(lock));
   		#else
   		    *mem -= val;
   		#endif /* APR_HAS_THREADS */
  @@ -248,13 +248,13 @@
   		
   		#if !defined(APR_OVERRIDE_ATOMIC_SET32)
   		void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val) 
  -      ######    {
  +           8    {
   		#if APR_HAS_THREADS
  -      ######        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  +           8        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
   		
  -      ######        CHECK(apr_thread_mutex_lock(lock));
  -      ######        *mem = val;
  -      ######        CHECK(apr_thread_mutex_unlock(lock));
  +           8        CHECK(apr_thread_mutex_lock(lock));
  +           8        *mem = val;
  +           8        CHECK(apr_thread_mutex_unlock(lock));
   		#else
   		    *mem = val;
   		#endif /* APR_HAS_THREADS */
  @@ -263,8 +263,8 @@
   		
   		#if !defined(APR_OVERRIDE_ATOMIC_INC32)
   		apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem) 
  -      ######    {
  -      ######        return apr_atomic_add32(mem, 1);
  +      800003    {
  +      800003        return apr_atomic_add32(mem, 1);
   		}
   		#endif /* !defined(APR_OVERRIDE_ATOMIC_INC32) */
   		
  @@ -282,16 +282,16 @@
   		}
   		#else
   		int apr_atomic_dec32(volatile apr_uint32_t *mem) 
  -      ######    {
  +     1600003    {
   		#if APR_HAS_THREADS
  -      ######        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  -      ######        apr_uint32_t new;
  +     1600003        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  +     1600003        apr_uint32_t new;
   		
  -      ######        CHECK(apr_thread_mutex_lock(lock));
  -      ######        (*mem)--;
  -      ######        new = *mem;
  -      ######        CHECK(apr_thread_mutex_unlock(lock));
  -      ######        return new;
  +     1600003        CHECK(apr_thread_mutex_lock(lock));
  +     1600003        (*mem)--;
  +     1600003        new = *mem;
  +     1600003        CHECK(apr_thread_mutex_unlock(lock));
  +     1600003        return new;
   		#else
   		    (*mem)--;
   		    return *mem; 
  @@ -303,24 +303,24 @@
   		#if !defined(APR_OVERRIDE_ATOMIC_CAS32)
   		apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,
   					      apr_uint32_t cmp)
  -      ######    {
  -      ######        apr_uint32_t prev;
  +           3    {
  +           3        apr_uint32_t prev;
   		#if APR_HAS_THREADS
  -      ######        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  +           3        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
   		
  -      ######        CHECK(apr_thread_mutex_lock(lock));
  -      ######        prev = *mem;
  -      ######        if (prev == cmp) {
  -      ######            *mem = with;
  +           3        CHECK(apr_thread_mutex_lock(lock));
  +           3        prev = *mem;
  +           3        if (prev == cmp) {
  +           2            *mem = with;
   		    }
  -      ######        CHECK(apr_thread_mutex_unlock(lock));
  +           3        CHECK(apr_thread_mutex_unlock(lock));
   		#else
   		    prev = *mem;
   		    if (prev == cmp) {
   		        *mem = with;
   		    }
   		#endif /* APR_HAS_THREADS */
  -      ######        return prev;
  +           3        return prev;
   		}
   		#endif /* !defined(APR_OVERRIDE_ATOMIC_CAS32) */
   		
  @@ -336,20 +336,20 @@
   		}
   		#else
   		apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
  -      ######    {
  -      ######        apr_uint32_t prev;
  +           1    {
  +           1        apr_uint32_t prev;
   		#if APR_HAS_THREADS
  -      ######        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
  +           1        apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
   		
  -      ######        CHECK(apr_thread_mutex_lock(lock));
  -      ######        prev = *mem;
  -      ######        *mem = val;
  -      ######        CHECK(apr_thread_mutex_unlock(lock));
  +           1        CHECK(apr_thread_mutex_lock(lock));
  +           1        prev = *mem;
  +           1        *mem = val;
  +           1        CHECK(apr_thread_mutex_unlock(lock));
   		#else
   		    prev = *mem;
   		    *mem = val;
   		#endif /* APR_HAS_THREADS */
  -      ######        return prev;
  +           1        return prev;
   		}
   		#endif /* defined(APR_OVERRIDE_ATOMIC_CAS32) */
   		#endif /* !defined(APR_OVERRIDE_ATOMIC_XCHG32) */
  @@ -379,8 +379,8 @@
   		
   		#if !defined(APR_OVERRIDE_ATOMIC_READ32)
   		APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)
  -      ######    {
  -      ######        return *mem;
  +           2    {
  +           2        return *mem;
   		}
   		#endif
   		
  
  
  
  1.2       +182 -182  apr-site/docs/coverage/apr_pools.c.gcov
  
  Index: apr_pools.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/apr_pools.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_pools.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ apr_pools.c.gcov	13 Mar 2004 03:27:09 -0000	1.2
  @@ -104,9 +104,9 @@
   		
             42        for (index = 0; index < MAX_INDEX; index++) {
             40            ref = &allocator->free[index];
  -          66            while ((node = *ref) != NULL) {
  -          26                *ref = node->next;
  -          26                free(node);
  +         103            while ((node = *ref) != NULL) {
  +          63                *ref = node->next;
  +          63                free(node);
   		        }
   		    }
   		
  @@ -122,8 +122,8 @@
   		
   		APR_DECLARE(apr_thread_mutex_t *) apr_allocator_mutex_get(
   		                                      apr_allocator_t *allocator)
  -          48    {
  -          48        return allocator->mutex;
  +         288    {
  +         288        return allocator->mutex;
   		}
   		#endif /* APR_HAS_THREADS */
   		
  @@ -134,8 +134,8 @@
   		}
   		
   		APR_DECLARE(apr_pool_t *) apr_allocator_owner_get(apr_allocator_t *allocator)
  -          52    {
  -          52        return allocator->owner;
  +         292    {
  +         292        return allocator->owner;
   		}
   		
   		APR_DECLARE(void) apr_allocator_max_free_set(apr_allocator_t *allocator,
  @@ -166,29 +166,29 @@
   		
   		static APR_INLINE
   		apr_memnode_t *allocator_alloc(apr_allocator_t *allocator, apr_size_t size)
  -          32    {
  -          32        apr_memnode_t *node, **ref;
  -          32        apr_uint32_t i, index, max_index;
  +         152    {
  +         152        apr_memnode_t *node, **ref;
  +         152        apr_uint32_t i, index, max_index;
   		
   		    /* Round up the block size to the next boundary, but always
   		     * allocate at least a certain size (MIN_ALLOC).
   		     */
  -          32        size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
  -          32        if (size < MIN_ALLOC)
  +         152        size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
  +         152        if (size < MIN_ALLOC)
              1            size = MIN_ALLOC;
   		
   		    /* Find the index for this node size by
   		     * dividing its size by the boundary size
   		     */
  -          32        index = (size >> BOUNDARY_INDEX) - 1;
  +         152        index = (size >> BOUNDARY_INDEX) - 1;
   		
   		    /* First see if there are any nodes in the area we know
   		     * our node will fit into.
   		     */
  -          32        if (index <= allocator->max_index) {
  +         152        if (index <= allocator->max_index) {
   		#if APR_HAS_THREADS
  -           5            if (allocator->mutex)
  -           5                apr_thread_mutex_lock(allocator->mutex);
  +          88            if (allocator->mutex)
  +          88                apr_thread_mutex_lock(allocator->mutex);
   		#endif /* APR_HAS_THREADS */
   		
   		        /* Walk the free list to see if there are
  @@ -201,43 +201,43 @@
   		         * like overkill though and could cause
   		         * memory waste.
   		         */
  -           5            max_index = allocator->max_index;
  -           5            ref = &allocator->free[index];
  -           5            i = index;
  -          27            while (*ref == NULL && i < max_index) {
  +          88            max_index = allocator->max_index;
  +          88            ref = &allocator->free[index];
  +          88            i = index;
  +         110            while (*ref == NULL && i < max_index) {
             22               ref++;
             22               i++;
   		        }
   		
  -           5            if ((node = *ref) != NULL) {
  +          88            if ((node = *ref) != NULL) {
   		            /* If we have found a node and it doesn't have any
   		             * nodes waiting in line behind it _and_ we are on
   		             * the highest available index, find the new highest
   		             * available index
   		             */
  -           5                if ((*ref = node->next) == NULL && i >= max_index) {
  -          17                    do {
  -          17                        ref--;
  -          17                        max_index--;
  -          17                    }
  +          88                if ((*ref = node->next) == NULL && i >= max_index) {
  +          71                    do {
  +          71                        ref--;
  +          71                        max_index--;
  +          71                    }
   		                while (*ref == NULL && max_index > 0);
   		
  -           3                    allocator->max_index = max_index;
  +          57                    allocator->max_index = max_index;
   		            }
   		
  -           5                allocator->current_free_index += node->index;
  -           5                if (allocator->current_free_index > allocator->max_free_index)
  -           3                    allocator->current_free_index = allocator->max_free_index;
  +          88                allocator->current_free_index += node->index;
  +          88                if (allocator->current_free_index > allocator->max_free_index)
  +          43                    allocator->current_free_index = allocator->max_free_index;
   		
   		#if APR_HAS_THREADS
  -           5                if (allocator->mutex)
  -           5                    apr_thread_mutex_unlock(allocator->mutex);
  +          88                if (allocator->mutex)
  +          88                    apr_thread_mutex_unlock(allocator->mutex);
   		#endif /* APR_HAS_THREADS */
   		
  -           5                node->next = NULL;
  -           5                node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
  +          88                node->next = NULL;
  +          88                node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
   		
  -           5                return node;
  +          88                return node;
   		        }
   		
   		#if APR_HAS_THREADS
  @@ -249,7 +249,7 @@
   		    /* If we found nothing, seek the sink (at index 0), if
   		     * it is not empty.
   		     */
  -          27        else if (allocator->free[0]) {
  +          64        else if (allocator->free[0]) {
   		#if APR_HAS_THREADS
              1            if (allocator->mutex)
              1                apr_thread_mutex_lock(allocator->mutex);
  @@ -289,55 +289,55 @@
   		    /* If we haven't got a suitable node, malloc a new one
   		     * and initialize it.
   		     */
  -          26        if ((node = malloc(size)) == NULL)
  +          63        if ((node = malloc(size)) == NULL)
         ######            return NULL;
   		
  -          26        node->next = NULL;
  -          26        node->index = index;
  -          26        node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
  -          26        node->endp = (char *)node + size;
  +          63        node->next = NULL;
  +          63        node->index = index;
  +          63        node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
  +          63        node->endp = (char *)node + size;
   		
  -          26        return node;
  +          63        return node;
   		}
   		
   		static APR_INLINE
   		void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
  -          27    {
  -          27        apr_memnode_t *next, *freelist = NULL;
  -          27        apr_uint32_t index, max_index;
  -          27        apr_uint32_t max_free_index, current_free_index;
  +         147    {
  +         147        apr_memnode_t *next, *freelist = NULL;
  +         147        apr_uint32_t index, max_index;
  +         147        apr_uint32_t max_free_index, current_free_index;
   		
   		#if APR_HAS_THREADS
  -          27        if (allocator->mutex)
  -          25            apr_thread_mutex_lock(allocator->mutex);
  +         147        if (allocator->mutex)
  +         145            apr_thread_mutex_lock(allocator->mutex);
   		#endif /* APR_HAS_THREADS */
   		
  -          27        max_index = allocator->max_index;
  -          27        max_free_index = allocator->max_free_index;
  -          27        current_free_index = allocator->current_free_index;
  +         147        max_index = allocator->max_index;
  +         147        max_free_index = allocator->max_free_index;
  +         147        current_free_index = allocator->current_free_index;
   		
   		    /* Walk the list of submitted nodes and free them one by one,
   		     * shoving them in the right 'size' buckets as we go.
   		     */
  -          32        do {
  -          32            next = node->next;
  -          32            index = node->index;
  +         152        do {
  +         152            next = node->next;
  +         152            index = node->index;
   		
  -          32            if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
  +         152            if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
   		            && index > current_free_index) {
         ######                node->next = freelist;
         ######                freelist = node;
   		        }
  -          32            else if (index < MAX_INDEX) {
  +         152            else if (index < MAX_INDEX) {
   		            /* Add the node to the appropiate 'size' bucket.  Adjust
   		             * the max_index when appropiate.
   		             */
  -          29                if ((node->next = allocator->free[index]) == NULL
  +         149                if ((node->next = allocator->free[index]) == NULL
   		                && index > max_index) {
  -           7                    max_index = index;
  +          61                    max_index = index;
   		            }
  -          29                allocator->free[index] = node;
  -          29                current_free_index -= index;
  +         149                allocator->free[index] = node;
  +         149                current_free_index -= index;
   		        }
   		        else {
   		            /* This node is too large to keep in a specific size bucket,
  @@ -347,17 +347,17 @@
              3                allocator->free[0] = node;
              3                current_free_index -= index;
   		        }
  -          32        } while ((node = next) != NULL);
  +         152        } while ((node = next) != NULL);
   		
  -          27        allocator->max_index = max_index;
  -          27        allocator->current_free_index = current_free_index;
  +         147        allocator->max_index = max_index;
  +         147        allocator->current_free_index = current_free_index;
   		
   		#if APR_HAS_THREADS
  -          27        if (allocator->mutex)
  -          25            apr_thread_mutex_unlock(allocator->mutex);
  +         147        if (allocator->mutex)
  +         145            apr_thread_mutex_unlock(allocator->mutex);
   		#endif /* APR_HAS_THREADS */
   		
  -          27        while (freelist != NULL) {
  +         147        while (freelist != NULL) {
         ######            node = freelist;
         ######            freelist = node->next;
         ######            free(node);
  @@ -578,20 +578,20 @@
   		 */
   		
   		APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size)
  -        1512    {
  -        1512        apr_memnode_t *active, *node;
  -        1512        void *mem;
  -        1512        apr_uint32_t free_index;
  +        1769    {
  +        1769        apr_memnode_t *active, *node;
  +        1769        void *mem;
  +        1769        apr_uint32_t free_index;
   		
  -        1512        size = APR_ALIGN_DEFAULT(size);
  -        1512        active = pool->active;
  +        1769        size = APR_ALIGN_DEFAULT(size);
  +        1769        active = pool->active;
   		
   		    /* If the active node has enough bytes left, use it. */
  -        1512        if (size < (apr_size_t)(active->endp - active->first_avail)) {
  -        1510            mem = active->first_avail;
  -        1510            active->first_avail += size;
  +        1769        if (size < (apr_size_t)(active->endp - active->first_avail)) {
  +        1767            mem = active->first_avail;
  +        1767            active->first_avail += size;
   		
  -        1510            return mem;
  +        1767            return mem;
   		    }
   		
              2        node = active->next;
  @@ -698,49 +698,49 @@
   		}
   		
   		APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool)
  -          26    {
  -          26        apr_memnode_t *active;
  -          26        apr_allocator_t *allocator;
  +         146    {
  +         146        apr_memnode_t *active;
  +         146        apr_allocator_t *allocator;
   		
   		    /* Destroy the subpools.  The subpools will detach themselve from
   		     * this pool thus this loop is safe and easy.
   		     */
  -          46        while (pool->child)
  +         166        while (pool->child)
             20            apr_pool_destroy(pool->child);
   		
   		    /* Run cleanups */
  -          26        run_cleanups(&pool->cleanups);
  +         146        run_cleanups(&pool->cleanups);
   		
   		    /* Free subprocesses */
  -          26        free_proc_chain(pool->subprocesses);
  +         146        free_proc_chain(pool->subprocesses);
   		
   		    /* Remove the pool from the parents child list */
  -          26        if (pool->parent) {
  +         146        if (pool->parent) {
   		#if APR_HAS_THREADS
  -          24            apr_thread_mutex_t *mutex;
  +         144            apr_thread_mutex_t *mutex;
   		
  -          24            if ((mutex = apr_allocator_mutex_get(pool->parent->allocator)) != NULL)
  -          24                apr_thread_mutex_lock(mutex);
  +         144            if ((mutex = apr_allocator_mutex_get(pool->parent->allocator)) != NULL)
  +         144                apr_thread_mutex_lock(mutex);
   		#endif /* APR_HAS_THREADS */
   		
  -          24            if ((*pool->ref = pool->sibling) != NULL)
  -          20                pool->sibling->ref = pool->ref;
  +         144            if ((*pool->ref = pool->sibling) != NULL)
  +         140                pool->sibling->ref = pool->ref;
   		
   		#if APR_HAS_THREADS
  -          24            if (mutex)
  -          24                apr_thread_mutex_unlock(mutex);
  +         144            if (mutex)
  +         144                apr_thread_mutex_unlock(mutex);
   		#endif /* APR_HAS_THREADS */
   		    }
   		
   		    /* Find the block attached to the pool structure.  Save a copy of the
   		     * allocator pointer, because the pool struct soon will be no more.
   		     */
  -          26        allocator = pool->allocator;
  -          26        active = pool->self;
  -          26        *active->ref = NULL;
  +         146        allocator = pool->allocator;
  +         146        active = pool->self;
  +         146        *active->ref = NULL;
   		
   		#if APR_HAS_THREADS
  -          26        if (apr_allocator_owner_get(allocator) == pool) {
  +         146        if (apr_allocator_owner_get(allocator) == pool) {
   		        /* Make sure to remove the lock, since it is highly likely to
   		         * be invalid now.
   		         */
  @@ -751,14 +751,14 @@
   		    /* Free all the nodes in the pool (including the node holding the
   		     * pool struct), by giving them back to the allocator.
   		     */
  -          26        allocator_free(allocator, active);
  +         146        allocator_free(allocator, active);
   		
   		    /* If this pool happens to be the owner of the allocator, free
   		     * everything in the allocator (that includes the pool struct
   		     * and the allocator).  Don't worry about destroying the optional mutex
   		     * in the allocator, it will have been destroyed by the cleanup function.
   		     */
  -          26        if (apr_allocator_owner_get(allocator) == pool) {
  +         146        if (apr_allocator_owner_get(allocator) == pool) {
              2            apr_allocator_destroy(allocator);
   		    }
   		}
  @@ -767,22 +767,22 @@
   		                                             apr_pool_t *parent,
   		                                             apr_abortfunc_t abort_fn,
   		                                             apr_allocator_t *allocator)
  -          26    {
  -          26        apr_pool_t *pool;
  -          26        apr_memnode_t *node;
  +         146    {
  +         146        apr_pool_t *pool;
  +         146        apr_memnode_t *node;
   		
  -          26        *newpool = NULL;
  +         146        *newpool = NULL;
   		
  -          26        if (!parent)
  +         146        if (!parent)
              7            parent = global_pool;
   		
  -          26        if (!abort_fn && parent)
  -          24            abort_fn = parent->abort_fn;
  +         146        if (!abort_fn && parent)
  +         144            abort_fn = parent->abort_fn;
   		
  -          26        if (allocator == NULL)
  -          24            allocator = parent->allocator;
  +         146        if (allocator == NULL)
  +         144            allocator = parent->allocator;
   		
  -          26        if ((node = allocator_alloc(allocator,
  +         146        if ((node = allocator_alloc(allocator,
   		                                MIN_ALLOC - APR_MEMNODE_T_SIZE)) == NULL) {
         ######            if (abort_fn)
         ######                abort_fn(APR_ENOMEM);
  @@ -790,42 +790,42 @@
         ######            return APR_ENOMEM;
   		    }
   		
  -          26        node->next = node;
  -          26        node->ref = &node->next;
  +         146        node->next = node;
  +         146        node->ref = &node->next;
   		
  -          26        pool = (apr_pool_t *)node->first_avail;
  -          26        node->first_avail = pool->self_first_avail = (char *)pool + SIZEOF_POOL_T;
  +         146        pool = (apr_pool_t *)node->first_avail;
  +         146        node->first_avail = pool->self_first_avail = (char *)pool + SIZEOF_POOL_T;
   		
  -          26        pool->allocator = allocator;
  -          26        pool->active = pool->self = node;
  -          26        pool->abort_fn = abort_fn;
  -          26        pool->child = NULL;
  -          26        pool->cleanups = NULL;
  -          26        pool->subprocesses = NULL;
  -          26        pool->user_data = NULL;
  -          26        pool->tag = NULL;
  +         146        pool->allocator = allocator;
  +         146        pool->active = pool->self = node;
  +         146        pool->abort_fn = abort_fn;
  +         146        pool->child = NULL;
  +         146        pool->cleanups = NULL;
  +         146        pool->subprocesses = NULL;
  +         146        pool->user_data = NULL;
  +         146        pool->tag = NULL;
   		
   		#ifdef NETWARE
   		    pool->owner_proc = (apr_os_proc_t)getnlmhandle();
   		#endif /* defined(NETWARE) */
   		
  -          26        if ((pool->parent = parent) != NULL) {
  +         146        if ((pool->parent = parent) != NULL) {
   		#if APR_HAS_THREADS
  -          24            apr_thread_mutex_t *mutex;
  +         144            apr_thread_mutex_t *mutex;
   		
  -          24            if ((mutex = apr_allocator_mutex_get(parent->allocator)) != NULL)
  -          24                apr_thread_mutex_lock(mutex);
  +         144            if ((mutex = apr_allocator_mutex_get(parent->allocator)) != NULL)
  +         144                apr_thread_mutex_lock(mutex);
   		#endif /* APR_HAS_THREADS */
   		
  -          24            if ((pool->sibling = parent->child) != NULL)
  -          20                pool->sibling->ref = &pool->sibling;
  +         144            if ((pool->sibling = parent->child) != NULL)
  +         140                pool->sibling->ref = &pool->sibling;
   		
  -          24            parent->child = pool;
  -          24            pool->ref = &parent->child;
  +         144            parent->child = pool;
  +         144            pool->ref = &parent->child;
   		
   		#if APR_HAS_THREADS
  -          24            if (mutex)
  -          24                apr_thread_mutex_unlock(mutex);
  +         144            if (mutex)
  +         144                apr_thread_mutex_unlock(mutex);
   		#endif /* APR_HAS_THREADS */
   		    }
   		    else {
  @@ -833,9 +833,9 @@
              2            pool->ref = NULL;
   		    }
   		
  -          26        *newpool = pool;
  +         146        *newpool = pool;
   		
  -          26        return APR_SUCCESS;
  +         146        return APR_SUCCESS;
   		}
   		
   		
  @@ -940,26 +940,26 @@
   		}
   		
   		APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
  -           2    {
  -           2        struct psprintf_data ps;
  -           2        char *strp;
  -           2        apr_size_t size;
  -           2        apr_memnode_t *active, *node;
  -           2        apr_uint32_t free_index;
  -		
  -           2        ps.node = active = pool->active;
  -           2        ps.pool = pool;
  -           2        ps.vbuff.curpos  = ps.node->first_avail;
  +           4    {
  +           4        struct psprintf_data ps;
  +           4        char *strp;
  +           4        apr_size_t size;
  +           4        apr_memnode_t *active, *node;
  +           4        apr_uint32_t free_index;
  +		
  +           4        ps.node = active = pool->active;
  +           4        ps.pool = pool;
  +           4        ps.vbuff.curpos  = ps.node->first_avail;
   		
   		    /* Save a byte for the NUL terminator */
  -           2        ps.vbuff.endpos = ps.node->endp - 1;
  -           2        ps.got_a_new_node = 0;
  -           2        ps.free = NULL;
  +           4        ps.vbuff.endpos = ps.node->endp - 1;
  +           4        ps.got_a_new_node = 0;
  +           4        ps.free = NULL;
   		
   		    /* Make sure that the first node passed to apr_vformatter has at least
   		     * room to hold the NUL terminator.
   		     */
  -           2        if (ps.node->first_avail == ps.node->endp) {
  +           4        if (ps.node->first_avail == ps.node->endp) {
         ######            if (psprintf_flush(&ps.vbuff) == -1) {
         ######                if (pool->abort_fn) {
         ######                    pool->abort_fn(APR_ENOMEM);
  @@ -969,29 +969,29 @@
   		        }
   		    }
   		
  -           2        if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {
  +           4        if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {
         ######            if (pool->abort_fn)
         ######                pool->abort_fn(APR_ENOMEM);
   		
         ######            return NULL;
   		    }
   		
  -           2        strp = ps.vbuff.curpos;
  -           2        *strp++ = '\0';
  +           4        strp = ps.vbuff.curpos;
  +           4        *strp++ = '\0';
   		
  -           2        size = strp - ps.node->first_avail;
  -           2        size = APR_ALIGN_DEFAULT(size);
  -           2        strp = ps.node->first_avail;
  -           2        ps.node->first_avail += size;
  +           4        size = strp - ps.node->first_avail;
  +           4        size = APR_ALIGN_DEFAULT(size);
  +           4        strp = ps.node->first_avail;
  +           4        ps.node->first_avail += size;
   		
  -           2        if (ps.free)
  +           4        if (ps.free)
              1            allocator_free(pool->allocator, ps.free);
   		
   		    /*
   		     * Link the node in if it's a new one
   		     */
  -           2        if (!ps.got_a_new_node)
  -           1            return strp;
  +           4        if (!ps.got_a_new_node)
  +           3            return strp;
   		
              1        active = pool->active;
              1        node = ps.node;
  @@ -1731,14 +1731,14 @@
   		 */
   		
   		APR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...)
  -           2    {
  -           2        va_list ap;
  -           2        char *res;
  +           4    {
  +           4        va_list ap;
  +           4        char *res;
   		
  -           2        va_start(ap, fmt);
  -           2        res = apr_pvsprintf(p, fmt, ap);
  -           2        va_end(ap);
  -           2        return res;
  +           4        va_start(ap, fmt);
  +           4        res = apr_pvsprintf(p, fmt, ap);
  +           4        va_end(ap);
  +           4        return res;
   		}
   		
   		/*
  @@ -1878,20 +1878,20 @@
   		APR_DECLARE(void) apr_pool_cleanup_register(apr_pool_t *p, const void *data,
   		                      apr_status_t (*plain_cleanup_fn)(void *data),
   		                      apr_status_t (*child_cleanup_fn)(void *data))
  -         163    {
  -         163        cleanup_t *c;
  +         171    {
  +         171        cleanup_t *c;
   		
   		#if APR_POOL_DEBUG
   		    apr_pool_check_integrity(p);
   		#endif /* APR_POOL_DEBUG */
   		
  -         163        if (p != NULL) {
  -         163            c = (cleanup_t *)apr_palloc(p, sizeof(cleanup_t));
  -         163            c->data = data;
  -         163            c->plain_cleanup_fn = plain_cleanup_fn;
  -         163            c->child_cleanup_fn = child_cleanup_fn;
  -         163            c->next = p->cleanups;
  -         163            p->cleanups = c;
  +         171        if (p != NULL) {
  +         171            c = (cleanup_t *)apr_palloc(p, sizeof(cleanup_t));
  +         171            c->data = data;
  +         171            c->plain_cleanup_fn = plain_cleanup_fn;
  +         171            c->child_cleanup_fn = child_cleanup_fn;
  +         171            c->next = p->cleanups;
  +         171            p->cleanups = c;
   		    }
   		}
   		
  @@ -1952,13 +1952,13 @@
   		}
   		
   		static void run_cleanups(cleanup_t **cref)
  -          27    {
  -          27        cleanup_t *c = *cref;
  +         147    {
  +         147        cleanup_t *c = *cref;
   		
  -          74        while (c) {
  -          47            *cref = c->next;
  -          47            (*c->plain_cleanup_fn)((void *)c->data);
  -          47            c = *cref;
  +         202        while (c) {
  +          55            *cref = c->next;
  +          55            (*c->plain_cleanup_fn)((void *)c->data);
  +          55            c = *cref;
   		    }
   		}
   		
  @@ -2022,17 +2022,17 @@
   		}
   		
   		static void free_proc_chain(struct process_chain *procs)
  -          27    {
  +         147    {
   		    /* Dispose of the subprocesses we've spawned off in the course of
   		     * whatever it was we're cleaning up now.  This may involve killing
   		     * some of them off...
   		     */
  -          27        struct process_chain *pc;
  -          27        int need_timeout = 0;
  -          27        apr_time_t timeout_interval;
  +         147        struct process_chain *pc;
  +         147        int need_timeout = 0;
  +         147        apr_time_t timeout_interval;
   		
  -          27        if (!procs)
  -          27            return; /* No work.  Whew! */
  +         147        if (!procs)
  +         147            return; /* No work.  Whew! */
   		
   		    /* First, check to see if we need to do the SIGTERM, sleep, SIGKILL
   		     * dance with any of the processes we're cleaning up.  If we've got
  
  
  
  1.2       +90 -90    apr-site/docs/coverage/apr_snprintf.c.gcov
  
  Index: apr_snprintf.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/apr_snprintf.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_snprintf.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ apr_snprintf.c.gcov	13 Mar 2004 03:27:09 -0000	1.2
  @@ -337,16 +337,16 @@
   		static char *conv_10(register wide_int num, register bool_int is_unsigned,
   		                     register bool_int *is_negative, char *buf_end,
   		                     register int *len)
  -          49    {
  -          49        register char *p = buf_end;
  -          49        register u_wide_int magnitude;
  +          51    {
  +          51        register char *p = buf_end;
  +          51        register u_wide_int magnitude;
   		
  -          49        if (is_unsigned) {
  +          51        if (is_unsigned) {
              2            magnitude = (u_wide_int) num;
              2            *is_negative = FALSE;
   		    }
   		    else {
  -          47            *is_negative = (num < 0);
  +          49            *is_negative = (num < 0);
   		
   		        /*
   		         * On a 2's complement machine, negating the most negative integer 
  @@ -357,28 +357,28 @@
   		         *      c. convert it to unsigned
   		         *      d. add 1
   		         */
  -          47            if (*is_negative) {
  -           1                wide_int t = num + 1;
  +          49            if (*is_negative) {
  +           2                wide_int t = num + 1;
   		
  -           1                magnitude = ((u_wide_int) -t) + 1;
  +           2                magnitude = ((u_wide_int) -t) + 1;
   		        }
   		        else
  -          46                magnitude = (u_wide_int) num;
  +          47                magnitude = (u_wide_int) num;
   		    }
   		
   		    /*
   		     * We use a do-while loop so that we write at least 1 digit 
   		     */
  -          78        do {
  -          78            register u_wide_int new_magnitude = magnitude / 10;
  +          80        do {
  +          80            register u_wide_int new_magnitude = magnitude / 10;
   		
  -          78            *--p = (char) (magnitude - new_magnitude * 10 + '0');
  -          78            magnitude = new_magnitude;
  -          78        }
  +          80            *--p = (char) (magnitude - new_magnitude * 10 + '0');
  +          80            magnitude = new_magnitude;
  +          80        }
   		    while (magnitude);
   		
  -          49        *len = buf_end - p;
  -          49        return (p);
  +          51        *len = buf_end - p;
  +          51        return (p);
   		}
   		
   		static char *conv_10_quad(widest_int num, register bool_int is_unsigned,
  @@ -668,71 +668,71 @@
   		 */
   		APR_DECLARE(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
   		    apr_vformatter_buff_t *vbuff, const char *fmt, va_list ap)
  -          56    {
  -          56        register char *sp;
  -          56        register char *bep;
  -          56        register int cc = 0;
  -          56        register int i;
  -		
  -          56        register char *s = NULL;
  -          56        char *q;
  -          56        int s_len;
  +          58    {
  +          58        register char *sp;
  +          58        register char *bep;
  +          58        register int cc = 0;
  +          58        register int i;
  +		
  +          58        register char *s = NULL;
  +          58        char *q;
  +          58        int s_len;
   		
  -          56        register int min_width = 0;
  -          56        int precision = 0;
  +          58        register int min_width = 0;
  +          58        int precision = 0;
   		    enum {
   		        LEFT, RIGHT
  -          56        } adjust;
  -          56        char pad_char;
  -          56        char prefix_char;
  -		
  -          56        double fp_num;
  -          56        widest_int i_quad = (widest_int) 0;
  -          56        u_widest_int ui_quad;
  -          56        wide_int i_num = (wide_int) 0;
  -          56        u_wide_int ui_num;
  +          58        } adjust;
  +          58        char pad_char;
  +          58        char prefix_char;
  +		
  +          58        double fp_num;
  +          58        widest_int i_quad = (widest_int) 0;
  +          58        u_widest_int ui_quad;
  +          58        wide_int i_num = (wide_int) 0;
  +          58        u_wide_int ui_num;
   		
  -          56        char num_buf[NUM_BUF_SIZE];
  -          56        char char_buf[2];                /* for printing %% and %<unknown> */
  +          58        char num_buf[NUM_BUF_SIZE];
  +          58        char char_buf[2];                /* for printing %% and %<unknown> */
   		
   		    enum var_type_enum {
   		            IS_QUAD, IS_LONG, IS_SHORT, IS_INT
   		    };
  -          56        enum var_type_enum var_type = IS_INT;
  +          58        enum var_type_enum var_type = IS_INT;
   		
   		    /*
   		     * Flag variables
   		     */
  -          56        boolean_e alternate_form;
  -          56        boolean_e print_sign;
  -          56        boolean_e print_blank;
  -          56        boolean_e adjust_precision;
  -          56        boolean_e adjust_width;
  -          56        bool_int is_negative;
  -		
  -          56        sp = vbuff->curpos;
  -          56        bep = vbuff->endpos;
  -		
  -         852        while (*fmt) {
  -         796            if (*fmt != '%') {
  -         634                INS_CHAR(*fmt, sp, bep, cc);
  +          58        boolean_e alternate_form;
  +          58        boolean_e print_sign;
  +          58        boolean_e print_blank;
  +          58        boolean_e adjust_precision;
  +          58        boolean_e adjust_width;
  +          58        bool_int is_negative;
  +		
  +          58        sp = vbuff->curpos;
  +          58        bep = vbuff->endpos;
  +		
  +         909        while (*fmt) {
  +         851            if (*fmt != '%') {
  +         687                INS_CHAR(*fmt, sp, bep, cc);
   		        }
   		        else {
   		            /*
   		             * Default variable settings
   		             */
  -         162                boolean_e print_something = YES;
  -         162                adjust = RIGHT;
  -         162                alternate_form = print_sign = print_blank = NO;
  -         162                pad_char = ' ';
  -         162                prefix_char = NUL;
  +         164                boolean_e print_something = YES;
  +         164                adjust = RIGHT;
  +         164                alternate_form = print_sign = print_blank = NO;
  +         164                pad_char = ' ';
  +         164                prefix_char = NUL;
   		
  -         162                fmt++;
  +         164                fmt++;
   		
   		            /*
   		             * Try to avoid checking for flags, width or precision
   		             */
  -         162                if (!apr_islower(*fmt)) {
  +         164                if (!apr_islower(*fmt)) {
   		                /*
   		                 * Recognize flags: -, #, BLANK, +
   		                 */
  @@ -792,13 +792,13 @@
              8                        adjust_precision = NO;
   		            }
   		            else
  -         153                    adjust_precision = adjust_width = NO;
  +         155                    adjust_precision = adjust_width = NO;
   		
   		            /*
   		             * Modifier check.  Note that if APR_INT64_T_FMT is "d",
   		             * the first if condition is never true.
   		             */
  -         162                if ((sizeof(APR_INT64_T_FMT) == 4 &&
  +         164                if ((sizeof(APR_INT64_T_FMT) == 4 &&
   		                 fmt[0] == APR_INT64_T_FMT[0] &&
   		                 fmt[1] == APR_INT64_T_FMT[1]) ||
   		                (sizeof(APR_INT64_T_FMT) == 3 &&
  @@ -810,20 +810,20 @@
              6                    var_type = IS_QUAD;
              6                    fmt += (sizeof(APR_INT64_T_FMT) - 2);
   		            }
  -         156                else if (*fmt == 'q') {
  +         158                else if (*fmt == 'q') {
         ######                    var_type = IS_QUAD;
         ######                    fmt++;
   		            }
  -         156                else if (*fmt == 'l') {
  +         158                else if (*fmt == 'l') {
              1                    var_type = IS_LONG;
              1                    fmt++;
   		            }
  -         155                else if (*fmt == 'h') {
  +         157                else if (*fmt == 'h') {
         ######                    var_type = IS_SHORT;
         ######                    fmt++;
   		            }
   		            else {
  -         155                    var_type = IS_INT;
  +         157                    var_type = IS_INT;
   		            }
   		
   		            /*
  @@ -837,7 +837,7 @@
   		             * NOTE: pad_char may be set to '0' because of the 0 flag.
   		             *   It is reset to ' ' by non-numeric formats
   		             */
  -         162                switch (*fmt) {
  +         164                switch (*fmt) {
   		            case 'u':
              3                    if (var_type == IS_QUAD) {
              3                        i_quad = va_arg(ap, u_widest_int);
  @@ -855,32 +855,32 @@
   		                            &num_buf[NUM_BUF_SIZE], &s_len);
   		                }
              3                    FIX_PRECISION(adjust_precision, precision, s, s_len);
  -          47                    break;
  +          49                    break;
   		
   		            case 'd':
   		            case 'i':
  -          47                    if (var_type == IS_QUAD) {
  +          49                    if (var_type == IS_QUAD) {
              2                        i_quad = va_arg(ap, widest_int);
              2                        s = conv_10_quad(i_quad, 0, &is_negative,
   		                            &num_buf[NUM_BUF_SIZE], &s_len);
   		                }
   		                else {
  -          45                        if (var_type == IS_LONG)
  +          47                        if (var_type == IS_LONG)
              1                            i_num = (wide_int) va_arg(ap, wide_int);
  -          44                        else if (var_type == IS_SHORT)
  +          46                        else if (var_type == IS_SHORT)
         ######                            i_num = (wide_int) (short) va_arg(ap, int);
   		                    else
  -          44                            i_num = (wide_int) va_arg(ap, int);
  -          45                        s = conv_10(i_num, 0, &is_negative,
  +          46                            i_num = (wide_int) va_arg(ap, int);
  +          47                        s = conv_10(i_num, 0, &is_negative,
   		                            &num_buf[NUM_BUF_SIZE], &s_len);
   		                }
  -          47                    FIX_PRECISION(adjust_precision, precision, s, s_len);
  +          49                    FIX_PRECISION(adjust_precision, precision, s, s_len);
   		
  -          47                    if (is_negative)
  -           1                        prefix_char = '-';
  -          46                    else if (print_sign)
  +          49                    if (is_negative)
  +           2                        prefix_char = '-';
  +          47                    else if (print_sign)
              1                        prefix_char = '+';
  -          45                    else if (print_blank)
  +          46                    else if (print_blank)
         ######                        prefix_char = ' ';
         ######                    break;
   		
  @@ -1204,15 +1204,15 @@
         ######                    s = char_buf;
         ######                    s_len = 2;
         ######                    pad_char = ' ';
  -         162                    break;
  +         164                    break;
   		            }
   		
  -         162                if (prefix_char != NUL && s != S_NULL && s != char_buf) {
  -           2                    *--s = prefix_char;
  -           2                    s_len++;
  +         164                if (prefix_char != NUL && s != S_NULL && s != char_buf) {
  +           3                    *--s = prefix_char;
  +           3                    s_len++;
   		            }
   		
  -         162                if (adjust_width && adjust == RIGHT && min_width > s_len) {
  +         164                if (adjust_width && adjust == RIGHT && min_width > s_len) {
              3                    if (pad_char == '0' && prefix_char != NUL) {
              1                        INS_CHAR(*s, sp, bep, cc);
              1                        s++;
  @@ -1225,21 +1225,21 @@
   		            /*
   		             * Print the string s. 
   		             */
  -         162                if (print_something == YES) {
  -      183814                    for (i = s_len; i != 0; i--) {
  -      183652                          INS_CHAR(*s, sp, bep, cc);
  -      183652                        s++;
  +         164                if (print_something == YES) {
  +      183819                    for (i = s_len; i != 0; i--) {
  +      183655                          INS_CHAR(*s, sp, bep, cc);
  +      183655                        s++;
   		                }
   		            }
   		
  -         162                if (adjust_width && adjust == LEFT && min_width > s_len)
  +         164                if (adjust_width && adjust == LEFT && min_width > s_len)
         ######                    PAD(min_width, s_len, pad_char);
   		        }
  -         796            fmt++;
  +         851            fmt++;
   		    }
  -          56        vbuff->curpos = sp;
  +          58        vbuff->curpos = sp;
   		
  -          56        return cc;
  +          58        return cc;
   		}
   		
   		
  
  
  
  1.7       +3 -3      apr-site/docs/coverage/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/index.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- index.html	11 Mar 2004 01:50:33 -0000	1.6
  +++ index.html	13 Mar 2004 03:27:09 -0000	1.7
  @@ -74,8 +74,8 @@
   
      <table border="0" width="100%" cellspacing="0">
   <tr>
  -<td bgcolor=#ffaaaa><a href="apr_atomic.c.gcov">apr_atomic</a><br>
  -<td bgcolor=#ffaaaa> 12.31% tested
  +<td bgcolor=#aaffaa><a href="apr_atomic.c.gcov">apr_atomic</a><br>
  +<td bgcolor=#aaffaa> 84.62% tested
   <tr>
   <td bgcolor=#ffaaaa><a href="apr_cpystrn.c.gcov">apr_cpystrn</a><br>
   <td bgcolor=#ffaaaa> 26.92% tested
  @@ -261,7 +261,7 @@
   <tr>
   <td bgcolor=#aaffaa><a href="waitio.c.gcov">waitio</a><br>
   <td bgcolor=#aaffaa> 92.86% tested
  -</table><p>Last generated Wed Mar 10 20:33:05 EST 2004</p>
  +</table><p>Last generated Fri Mar 12 22:08:16 EST 2004</p>
   </td></tr>
   </table>
      <!-- FOOTER -->
  
  
  
  1.2       +30 -30    apr-site/docs/coverage/thread.c.gcov
  
  Index: thread.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/thread.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- thread.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ thread.c.gcov	13 Mar 2004 03:27:09 -0000	1.2
  @@ -95,9 +95,9 @@
   		}
   		
   		static void *dummy_worker(void *opaque)
  -          17    {
  -          17        apr_thread_t *thread = (apr_thread_t*)opaque;
  -          17        return thread->func(thread, thread->data);
  +         137    {
  +         137        apr_thread_t *thread = (apr_thread_t*)opaque;
  +         137        return thread->func(thread, thread->data);
   		}
   		
   		APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
  @@ -105,38 +105,38 @@
   		                                            apr_thread_start_t func,
   		                                            void *data,
   		                                            apr_pool_t *pool)
  -          17    {
  -          17        apr_status_t stat;
  -          17        pthread_attr_t *temp;
  +         137    {
  +         137        apr_status_t stat;
  +         137        pthread_attr_t *temp;
   		
  -          17        (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
  +         137        (*new) = (apr_thread_t *)apr_pcalloc(pool, sizeof(apr_thread_t));
   		
  -          17        if ((*new) == NULL) {
  +         137        if ((*new) == NULL) {
         ######            return APR_ENOMEM;
   		    }
   		
  -          17        (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));
  +         137        (*new)->td = (pthread_t *)apr_pcalloc(pool, sizeof(pthread_t));
   		
  -          17        if ((*new)->td == NULL) {
  +         137        if ((*new)->td == NULL) {
         ######            return APR_ENOMEM;
   		    }
   		
  -          17        (*new)->pool = pool;
  -          17        (*new)->data = data;
  -          17        (*new)->func = func;
  +         137        (*new)->pool = pool;
  +         137        (*new)->data = data;
  +         137        (*new)->func = func;
   		
  -          17        if (attr)
  +         137        if (attr)
         ######            temp = &attr->attr;
   		    else
  -          17            temp = NULL;
  +         137            temp = NULL;
   		
  -          17        stat = apr_pool_create(&(*new)->pool, pool);
  -          17        if (stat != APR_SUCCESS) {
  +         137        stat = apr_pool_create(&(*new)->pool, pool);
  +         137        if (stat != APR_SUCCESS) {
         ######            return stat;
   		    }
   		
  -          17        if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
  -          17            return APR_SUCCESS;
  +         137        if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
  +         137            return APR_SUCCESS;
   		    }
   		    else {
   		#ifdef PTHREAD_SETS_ERRNO
  @@ -160,22 +160,22 @@
   		
   		APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
   		                                          apr_status_t retval)
  -           4    {
  -           4        thd->exitval = retval;
  -           4        apr_pool_destroy(thd->pool);
  -           4        pthread_exit(NULL);
  +         124    {
  +         124        thd->exitval = retval;
  +         124        apr_pool_destroy(thd->pool);
  +         124        pthread_exit(NULL);
   		    return APR_SUCCESS;
   		}
   		
   		APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval,
   		                                          apr_thread_t *thd)
  -          17    {
  -          17        apr_status_t stat;
  -          17        apr_status_t *thread_stat;
  -		
  -          17        if ((stat = pthread_join(*thd->td,(void *)&thread_stat)) == 0) {
  -          17            *retval = thd->exitval;
  -          17            return APR_SUCCESS;
  +         137    {
  +         137        apr_status_t stat;
  +         137        apr_status_t *thread_stat;
  +		
  +         137        if ((stat = pthread_join(*thd->td,(void *)&thread_stat)) == 0) {
  +         137            *retval = thd->exitval;
  +         137            return APR_SUCCESS;
   		    }
   		    else {
   		#ifdef PTHREAD_SETS_ERRNO
  
  
  
  1.2       +25 -25    apr-site/docs/coverage/thread_mutex.c.gcov
  
  Index: thread_mutex.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/thread_mutex.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- thread_mutex.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ thread_mutex.c.gcov	13 Mar 2004 03:27:09 -0000	1.2
  @@ -20,55 +20,55 @@
   		#if APR_HAS_THREADS
   		
   		static apr_status_t thread_mutex_cleanup(void *data)
  -          21    {
  -          21        apr_thread_mutex_t *mutex = data;
  -          21        apr_status_t rv;
  +          29    {
  +          29        apr_thread_mutex_t *mutex = data;
  +          29        apr_status_t rv;
   		
  -          21        rv = pthread_mutex_destroy(&mutex->mutex);
  +          29        rv = pthread_mutex_destroy(&mutex->mutex);
   		#ifdef PTHREAD_SETS_ERRNO
   		    if (rv) {
   		        rv = errno;
   		    }
   		#endif
  -          21        return rv;
  +          29        return rv;
   		} 
   		
   		APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex,
   		                                                  unsigned int flags,
   		                                                  apr_pool_t *pool)
  -          21    {
  -          21        apr_thread_mutex_t *new_mutex;
  -          21        apr_status_t rv;
  +          29    {
  +          29        apr_thread_mutex_t *new_mutex;
  +          29        apr_status_t rv;
   		
  -          21        new_mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
  +          29        new_mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
   		
  -          21        new_mutex->pool = pool;
  +          29        new_mutex->pool = pool;
   		
   		    /* Optimal default is APR_THREAD_MUTEX_UNNESTED, 
   		     * no additional checks required for either flag.
   		     */
  -          21        new_mutex->nested = flags & APR_THREAD_MUTEX_NESTED;
  +          29        new_mutex->nested = flags & APR_THREAD_MUTEX_NESTED;
   		
  -          21        if ((rv = pthread_mutex_init(&new_mutex->mutex, NULL))) {
  +          29        if ((rv = pthread_mutex_init(&new_mutex->mutex, NULL))) {
   		#ifdef PTHREAD_SETS_ERRNO
   		        rv = errno;
   		#endif
         ######            return rv;
   		    }
   		
  -          21        apr_pool_cleanup_register(new_mutex->pool,
  +          29        apr_pool_cleanup_register(new_mutex->pool,
   		                              new_mutex, thread_mutex_cleanup,
   		                              apr_pool_cleanup_null);
   		
  -          21        *mutex = new_mutex;
  -          21        return APR_SUCCESS;
  +          29        *mutex = new_mutex;
  +          29        return APR_SUCCESS;
   		}
   		
   		APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
  -      380088    {
  -      380088        apr_status_t rv;
  +     4380552    {
  +     4380552        apr_status_t rv;
   		
  -      380088        if (mutex->nested) {
  +     4380552        if (mutex->nested) {
   		        /*
   		         * Although threadsafe, this test is NOT reentrant.  
   		         * The thread's main and reentrant attempts will both mismatch 
  @@ -101,13 +101,13 @@
         ######            return rv;
   		    }
   		    else {
  -      380088            rv = pthread_mutex_lock(&mutex->mutex);
  +     4380552            rv = pthread_mutex_lock(&mutex->mutex);
   		#ifdef PTHREAD_SETS_ERRNO
   		        if (rv) {
   		            rv = errno;
   		        }
   		#endif
  -      380088            return rv;
  +     4380552            return rv;
   		    }
   		}
   		
  @@ -163,10 +163,10 @@
   		static apr_os_thread_t invalid_thread_id; /* all zeroes */
   		
   		APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
  -      380088    {
  -      380088        apr_status_t status;
  +     4380552    {
  +     4380552        apr_status_t status;
   		
  -      380088        if (mutex->nested) {
  +     4380552        if (mutex->nested) {
   		        /*
   		         * The code below is threadsafe and reentrant.
   		         */
  @@ -190,14 +190,14 @@
   		        }
   		    }
   		
  -      380088        status = pthread_mutex_unlock(&mutex->mutex);
  +     4380552        status = pthread_mutex_unlock(&mutex->mutex);
   		#ifdef PTHREAD_SETS_ERRNO
   		    if (status) {
   		        status = errno;
   		    }
   		#endif
   		
  -      380088        return status;
  +     4380552        return status;
   		}
   		
   		APR_DECLARE(apr_status_t) apr_thread_mutex_destroy(apr_thread_mutex_t *mutex)
  
  
  

Mime
View raw message