src > apr > misc > unix > start.c > apr_initialize


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

APR_DECLARE(apr_status_t) apr_initialize(void)
{
   apr_pool_t *pool;
   apr_status_t status;

   if (initialized++) {
       return APR_SUCCESS;
   }

#if
!defined(BEOS) && !defined(OS2)
   apr_proc_mutex_unix_setup_lock();
   apr_unix_setup_time();
#endif
   if ((status = apr_pool_initialize()) != APR_SUCCESS)
       return status;
   
   if (apr_pool_create(&pool, NULL) != APR_SUCCESS) {
       return APR_ENOPOOL;
   }

   apr_pool_tag(pool, "apr_initialize");

   /* apr_atomic_init() used to be called from here aswell.
    * Pools rely on mutexes though, which can be backed by
    * atomics.  Due to this circular dependency
    * apr_pool_initialize() is taking care of calling
    * apr_atomic_init() at the correct time.
    */

   apr_signal_init(pool);

   return APR_SUCCESS;
}