FreeBSD/contrib/subversion/subversion/libsvn_subr/object_pool.c
/* Handle reference counting for the OBJECT_REF that the caller is about
 * to return.  The reference will be released when POOL gets cleaned up.
 *
 * Requires external serialization on OBJECT_REF->OBJECT_POOL.
 */
Handle reference counting for the OBJECT_REF that the caller is about
to return.  The reference will be released when POOL gets cleaned up.


Handle reference counting for the OBJECT_REF that the caller is about to return . The reference will be released when POOL gets cleaned up .
static void
add_object_ref(object_ref_t *object_ref,
              apr_pool_t *pool)
{
  if (svn_atomic_inc(&object_ref->ref_count) == 0)
    svn_atomic_dec(&object_ref->object_pool->unused_count);
  apr_pool_cleanup_register(pool, object_ref, object_ref_cleanup,
                            apr_pool_cleanup_null);
}
static void add_object_ref ( object_ref_t * object_ref , apr_pool_t * pool ) { if ( svn_atomic_inc ( & object_ref -> ref_count ) == 0 ) svn_atomic_dec ( & object_ref -> object_pool -> unused_count ) ; apr_pool_cleanup_register ( pool , object_ref , object_ref_cleanup , apr_pool_cleanup_null ) ; }
Handle reference counting for the OBJECT_REF that the caller is about
 to return.
Handle reference counting for the OBJECT_REF that the caller is about to return .
/* Update ref counter.
     Note that this is racy with object_ref_cleanup; see comment there. */ /* make sure the reference gets released automatically */