svn_dso.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  * Copyright (c) 2006 CollabNet.  All rights reserved.
00005  *
00006  * This software is licensed as described in the file COPYING, which
00007  * you should have received as part of this distribution.  The terms
00008  * are also available at http://subversion.tigris.org/license-1.html.
00009  * If newer versions of this license are posted there, you may use a
00010  * newer version instead, at your option.
00011  *
00012  * This software consists of voluntary contributions made by many
00013  * individuals.  For exact contribution history, see the revision
00014  * history and logs, available at http://subversion.tigris.org/.
00015  * ====================================================================
00016  * @endcopyright
00017  *
00018  * @file svn_dso.h
00019  * @brief DSO loading routines
00020  */
00021 
00022 
00023 
00024 #ifndef SVN_DSO_H
00025 #define SVN_DSO_H
00026 
00027 #include <apr_dso.h>
00028 
00029 #include "svn_error.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif /* __cplusplus */
00034 
00035 /**
00036  * Initialize the DSO loading routines.
00037  *
00038  * @note This should be called prior to the creation of any pool that
00039  *       is passed to a function that comes from a DSO, otherwise you
00040  *       risk having the DSO unloaded before all pool cleanup callbacks
00041  *       that live in the DSO have been executed.  If it is not called
00042  *       prior to @c svn_dso_load being used for the first time there
00043  *       will be a best effort attempt made to initialize the subsystem,
00044  *       but it will not be entirely thread safe and it risks running
00045  *       into the previously mentioned problems with DSO unloading and
00046  *       pool cleanup callbacks.
00047  *
00048  * @since New in 1.4.0.
00049  */
00050 void svn_dso_initialize(void);
00051 
00052 #if APR_HAS_DSO
00053 /**
00054  * Attempt to load @a libname, returning it in @a dso.
00055  *
00056  * If @a libname cannot be loaded set @a dso to NULL and return
00057  * @c SVN_NO_ERROR.
00058  *
00059  * @note Due to pool lifetime issues DSOs are all loaded into a global
00060  *       pool, so you must be certain that there is a bounded number of
00061  *       them that will ever be loaded by the system, otherwise you will
00062  *       leak memory.
00063  *
00064  * @since New in 1.4.0.
00065  */
00066 svn_error_t *svn_dso_load(apr_dso_handle_t **dso, const char *libname);
00067 #endif /* APR_HAS_DSO */
00068 
00069 #ifdef __cplusplus
00070 }
00071 #endif /* __cplusplus */
00072 
00073 #endif /* SVN_DSO_H */

Generated on Wed Oct 22 14:54:29 2008 for Subversion by  doxygen 1.4.7