apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@apache.org>
Subject Re: svn commit: r594037 - in /apr/apr-util/trunk: dbd/apr_dbd.c include/private/apr_dbd_internal.h
Date Tue, 13 Nov 2007 02:21:03 GMT
bojan@apache.org wrote:
> Author: bojan
> Date: Sun Nov 11 23:46:40 2007
> New Revision: 594037
> 

[..]

>  #if APR_HAS_THREADS
>  static apr_thread_mutex_t* mutex = NULL;
> -apr_status_t apr_dbd_mutex_lock()
> +APU_DECLARE(apr_status_t) apr_dbd_mutex_lock()
>  {
>      return apr_thread_mutex_lock(mutex);
>  }
> -apr_status_t apr_dbd_mutex_unlock()
> +APU_DECLARE(apr_status_t) apr_dbd_mutex_unlock()
>  {
>      return apr_thread_mutex_unlock(mutex);
>  }

Missing for the #else case.

>  
>  /* Export mutex lock/unlock for drivers that need it */
> -apr_status_t apr_dbd_mutex_lock(void);
> -apr_status_t apr_dbd_mutex_unlock(void);
> +APU_DECLARE(apr_status_t) apr_dbd_mutex_lock(void);
> +APU_DECLARE(apr_status_t) apr_dbd_mutex_unlock(void);
>  

It's the functions supposed to be publicly used? If yes, you should
export then properly (apr_dbd.h). If not, it would be better to extend
apr_dbd_t with lock and unlock methods which can back point to private
functions.

Regards,

--
Davi Arnaut

Mime
View raw message