ltdl.h File Reference

#include <sys/types.h>

Include dependency graph for ltdl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lt_dlsymlist
struct  lt_dlinfo
struct  lt_user_dlloader

Defines

#define LTDL_H   1
#define LT_EOS_CHAR   '\0'
#define LT_BEGIN_C_DECLS
#define LT_END_C_DECLS
#define LT_PARAMS(protos)   ()
#define lt_ptr   char*
#define LT_STMT_START   do
#define LT_STMT_END   while (0)
#define LT_CONC(s, t)   s/**/t
#define LT_STRLEN(s)   (((s) && (s)[0]) ? strlen (s) : 0)
#define LT_PATHSEP_CHAR   ':'
#define LT_SCOPE   extern
#define LTDL_SET_PRELOADED_SYMBOLS()
#define lt_dlerror_table
#define LT_ERROR(name, diagnostic)   LT_CONC(LT_ERROR_, name),

Typedefs

typedef lt_dlhandle_structlt_dlhandle
typedef void lt_dlmutex_lock ()
typedef void lt_dlmutex_unlock ()
typedef void lt_dlmutex_seterror ()
typedef const char * lt_dlmutex_geterror ()
typedef unsigned lt_dlcaller_id
typedef lt_dlloader lt_dlloader
typedef char * lt_user_data
typedef char * lt_module
typedef lt_module lt_module_open ()
typedef int lt_module_close ()
typedef char * lt_find_sym ()
typedef int lt_dlloader_exit ()

Enumerations

enum  {
  name, UNKNOWN, DLOPEN_NOT_SUPPORTED, INVALID_LOADER,
  INIT_LOADER, REMOVE_LOADER, FILE_NOT_FOUND, DEPLIB_NOT_FOUND,
  NO_SYMBOLS, CANNOT_OPEN, CANNOT_CLOSE, SYMBOL_NOT_FOUND,
  NO_MEMORY, INVALID_HANDLE, BUFFER_OVERFLOW, INVALID_ERRORCODE,
  SHUTDOWN, CLOSE_RESIDENT_MODULE, INVALID_MUTEX_ARGS, INVALID_POSITION,
  LT_ERROR_MAX
}

Functions

int lt_dlinit ()
int lt_dlexit ()
int lt_dladdsearchdir ()
int lt_dlinsertsearchdir ()
int lt_dlsetsearchpath ()
const char * lt_dlgetsearchpath ()
int lt_dlforeachfile ()
lt_dlhandle lt_dlopen ()
lt_dlhandle lt_dlopenext ()
char * lt_dlsym ()
const char * lt_dlerror ()
int lt_dlclose ()
int lt_dlmakeresident ()
int lt_dlisresident ()
int lt_dlmutex_register ()
int lt_dlpreload ()
int lt_dlpreload_default ()
const lt_dlinfolt_dlgetinfo ()
lt_dlhandle lt_dlhandle_next ()
int lt_dlforeach ()
lt_dlcaller_id lt_dlcaller_register ()
char * lt_dlcaller_set_data ()
char * lt_dlcaller_get_data ()
lt_dlloaderlt_dlloader_next ()
lt_dlloaderlt_dlloader_find ()
const char * lt_dlloader_name ()
lt_user_datalt_dlloader_data ()
int lt_dlloader_add ()
int lt_dlloader_remove ()
int lt_dladderror ()
int lt_dlseterror ()

Variables

char *(* lt_dlmalloc )()
char *(* lt_dlrealloc )()
void(* lt_dlfree )()


Define Documentation

#define LT_BEGIN_C_DECLS
 

Definition at line 47 of file ltdl.h.

#define LT_CONC s,
 )     s/**/t
 

Definition at line 85 of file ltdl.h.

#define lt_dlerror_table
 

Value:

LT_ERROR(UNKNOWN,                   "unknown error")                    \
    LT_ERROR(DLOPEN_NOT_SUPPORTED,  "dlopen support not available")     \
    LT_ERROR(INVALID_LOADER,        "invalid loader")                   \
    LT_ERROR(INIT_LOADER,           "loader initialization failed")     \
    LT_ERROR(REMOVE_LOADER,         "loader removal failed")            \
    LT_ERROR(FILE_NOT_FOUND,        "file not found")                   \
    LT_ERROR(DEPLIB_NOT_FOUND,      "dependency library not found")     \
    LT_ERROR(NO_SYMBOLS,            "no symbols defined")               \
    LT_ERROR(CANNOT_OPEN,           "can't open the module")            \
    LT_ERROR(CANNOT_CLOSE,          "can't close the module")           \
    LT_ERROR(SYMBOL_NOT_FOUND,      "symbol not found")                 \
    LT_ERROR(NO_MEMORY,             "not enough memory")                \
    LT_ERROR(INVALID_HANDLE,        "invalid module handle")            \
    LT_ERROR(BUFFER_OVERFLOW,       "internal buffer overflow")         \
    LT_ERROR(INVALID_ERRORCODE,     "invalid errorcode")                \
    LT_ERROR(SHUTDOWN,              "library already shutdown")         \
    LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module")      \
    LT_ERROR(INVALID_MUTEX_ARGS,    "invalid mutex handler registration") \
    LT_ERROR(INVALID_POSITION,      "invalid search path insert position")

Definition at line 313 of file ltdl.h.

#define LT_END_C_DECLS
 

Definition at line 48 of file ltdl.h.

#define LT_EOS_CHAR   '\0'
 

Definition at line 38 of file ltdl.h.

Referenced by canonicalize_path(), find_file_callback(), lt_argz_insertdir(), lt_dlopenext(), rpl_argz_create_sep(), rpl_argz_insert(), rpl_argz_next(), rpl_argz_stringify(), rpl_strchr(), rpl_strrchr(), trim(), and try_dlopen().

#define LT_ERROR name,
diagnostic   )     LT_CONC(LT_ERROR_, name),
 

#define LT_PARAMS protos   )     ()
 

Definition at line 61 of file ltdl.h.

Referenced by foreachfile_callback().

#define LT_PATHSEP_CHAR   ':'
 

Definition at line 124 of file ltdl.h.

Referenced by argzize_path(), canonicalize_path(), and lt_dlpath_insertdir().

#define lt_ptr   char*
 

Examples:
tests/mybackend.cc.

Definition at line 62 of file ltdl.h.

Referenced by ltmm::backend< ThreadPolicy >::find_sym(), ltmm::handle< ThreadPolicy >::find_symbol(), foreachfile_callback(), ltmm::loader< ThreadPolicy >::load(), lt_dlcaller_get_data(), lt_dlcaller_set_data(), lt_dlsym(), lt_emalloc(), lt_erealloc(), ltmm::symbol::symbol(), and ltmm::loader< ThreadPolicy >::unload().

#define LT_SCOPE   extern
 

Definition at line 139 of file ltdl.h.

#define LT_STMT_END   while (0)
 

Definition at line 76 of file ltdl.h.

#define LT_STMT_START   do
 

Definition at line 75 of file ltdl.h.

#define LT_STRLEN  )     (((s) && (s)[0]) ? strlen (s) : 0)
 

Definition at line 89 of file ltdl.h.

Referenced by canonicalize_path(), foreach_dirinpath(), list_files_by_dir(), load_deplibs(), lt_argz_insertdir(), lt_dlinsertsearchdir(), lt_dlopenext(), lt_dlsetsearchpath(), lt_dlsym(), lt_estrdup(), rpl_argz_create_sep(), rpl_argz_insert(), trim(), try_dlopen(), and tryall_dlopen_module().

#define LTDL_H   1
 

Definition at line 29 of file ltdl.h.

 
#define LTDL_SET_PRELOADED_SYMBOLS  ) 
 

Value:

LT_STMT_START{  \
        extern const lt_dlsymlist lt_preloaded_symbols[];               \
        lt_dlpreload_default(lt_preloaded_symbols);                     \
                                                }LT_STMT_END

Definition at line 230 of file ltdl.h.


Typedef Documentation

typedef unsigned lt_dlcaller_id
 

Definition at line 256 of file ltdl.h.

typedef struct lt_dlhandle_struct* lt_dlhandle
 

Definition at line 153 of file ltdl.h.

typedef struct lt_dlloader lt_dlloader
 

Definition at line 270 of file ltdl.h.

typedef int lt_dlloader_exit()
 

Definition at line 282 of file ltdl.h.

typedef const char* lt_dlmutex_geterror()
 

Definition at line 191 of file ltdl.h.

typedef void lt_dlmutex_lock()
 

Definition at line 188 of file ltdl.h.

typedef void lt_dlmutex_seterror()
 

Definition at line 190 of file ltdl.h.

typedef void lt_dlmutex_unlock()
 

Definition at line 189 of file ltdl.h.

typedef char* lt_find_sym()
 

Definition at line 281 of file ltdl.h.

typedef char* lt_module
 

Examples:
tests/mybackend.cc.

Definition at line 272 of file ltdl.h.

typedef int lt_module_close()
 

Definition at line 278 of file ltdl.h.

typedef lt_module lt_module_open()
 

Definition at line 276 of file ltdl.h.

typedef char* lt_user_data
 

Definition at line 271 of file ltdl.h.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
name 
UNKNOWN 
DLOPEN_NOT_SUPPORTED 
INVALID_LOADER 
INIT_LOADER 
REMOVE_LOADER 
FILE_NOT_FOUND 
DEPLIB_NOT_FOUND 
NO_SYMBOLS 
CANNOT_OPEN 
CANNOT_CLOSE 
SYMBOL_NOT_FOUND 
NO_MEMORY 
INVALID_HANDLE 
BUFFER_OVERFLOW 
INVALID_ERRORCODE 
SHUTDOWN 
CLOSE_RESIDENT_MODULE 
INVALID_MUTEX_ARGS 
INVALID_POSITION 
LT_ERROR_MAX 

Definition at line 335 of file ltdl.h.


Function Documentation

int lt_dladderror  ) 
 

int lt_dladdsearchdir  ) 
 

char* lt_dlcaller_get_data  ) 
 

lt_dlcaller_id lt_dlcaller_register  ) 
 

Definition at line 4165 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

Referenced by ltmm::loader< ThreadPolicy >::loader().

char* lt_dlcaller_set_data  ) 
 

int lt_dlclose  ) 
 

const char* lt_dlerror  ) 
 

Definition at line 3911 of file ltdl.c.

References LT_DLMUTEX_GETERROR, and LT_DLMUTEX_SETERROR.

int lt_dlexit  ) 
 

Definition at line 2268 of file ltdl.c.

References lt_dlloader::dlloader_data, lt_dlloader::dlloader_exit, lt_dlclose(), LT_DLIS_RESIDENT, LT_DLMEM_REASSIGN, LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, LT_DLSTRERROR, lt_dlloader::next, lt_dlhandle_struct::next, and SHUTDOWN.

Referenced by ltmm::loader< ThreadPolicy >::~loader().

Here is the call graph for this function:

int lt_dlforeach  ) 
 

int lt_dlforeachfile  ) 
 

const lt_dlinfo* lt_dlgetinfo  ) 
 

const char* lt_dlgetsearchpath  ) 
 

Definition at line 4068 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

Referenced by ltmm::loader< ThreadPolicy >::search_path().

lt_dlhandle lt_dlhandle_next  ) 
 

int lt_dlinit  ) 
 

Definition at line 2182 of file ltdl.c.

References lt_user_dlloader::dlloader_data, DLOPEN_NOT_SUPPORTED, INIT_LOADER, lt_dlloader_add(), lt_dlloader_next(), LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, LT_DLSTRERROR, and presym_init().

Referenced by ltmm::loader< ThreadPolicy >::loader().

Here is the call graph for this function:

int lt_dlinsertsearchdir  ) 
 

int lt_dlisresident  ) 
 

int lt_dlloader_add  ) 
 

lt_user_data* lt_dlloader_data  ) 
 

lt_dlloader* lt_dlloader_find  ) 
 

const char* lt_dlloader_name  ) 
 

lt_dlloader* lt_dlloader_next  ) 
 

int lt_dlloader_remove  ) 
 

int lt_dlmakeresident  ) 
 

int lt_dlmutex_register  ) 
 

lt_dlhandle lt_dlopen  ) 
 

lt_dlhandle lt_dlopenext  ) 
 

int lt_dlpreload  ) 
 

int lt_dlpreload_default  ) 
 

int lt_dlseterror  ) 
 

int lt_dlsetsearchpath  ) 
 

char* lt_dlsym  ) 
 


Variable Documentation

void(* lt_dlfree)()
 

Definition at line 224 of file ltdl.c.

char*(* lt_dlmalloc)()
 

Definition at line 220 of file ltdl.c.

Referenced by lt_emalloc().

char*(* lt_dlrealloc)()
 

Definition at line 222 of file ltdl.c.

Referenced by lt_erealloc().

Top of page
Last update Mon Jun 27 13:25:10 2005
Christian Holm
Created by DoxyGen 1.4.3-20050530