diff options
author | Ingo Huerner <ingo.huerner@xse.de> | 2014-07-02 15:46:13 +0200 |
---|---|---|
committer | Ingo Huerner <ingo.huerner@xse.de> | 2014-07-02 15:46:13 +0200 |
commit | b13802972ee82370c33a14150e480220761cac75 (patch) | |
tree | 4b239280db49e752b2c89565dffd6f16120eae5a /src/persistence_client_library_custom_loader.c | |
parent | 6ba53c043395da1c17a51dbea6ff7432731a9944 (diff) | |
download | persistence-client-library-b13802972ee82370c33a14150e480220761cac75.tar.gz |
Protected global variables with mutex; minor optimizations; corrected doxygen documentation
Diffstat (limited to 'src/persistence_client_library_custom_loader.c')
-rw-r--r-- | src/persistence_client_library_custom_loader.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/persistence_client_library_custom_loader.c b/src/persistence_client_library_custom_loader.c index db3a16d..8a5c1a4 100644 --- a/src/persistence_client_library_custom_loader.c +++ b/src/persistence_client_library_custom_loader.c @@ -43,14 +43,14 @@ typedef struct sPersCustomLibInfo /// array with custom client library names static PersCustomLibInfo gCustomLibArray[PersCustomLib_LastEntry]; -char* gpCustomConfigFileMap = 0; +static char* gpCustomConfigFileMap = 0; static char* gpCustomTokenArray[TOKENARRAYSIZE]; -int gCustomTokenCounter = 0; -unsigned int gCustomConfigFileSize = 0; +static int gCustomTokenCounter = 0; +static unsigned int gCustomConfigFileSize = 0; int(* gPlugin_callback_async_t)(int errcode); -void fillCustomCharTokenArray() +static void fillCustomCharTokenArray() { unsigned int i=0; int blankCount=0; @@ -81,12 +81,8 @@ void fillCustomCharTokenArray() } } -PersLoadingType_e getCustomLoadingType(int i) -{ - return gCustomLibArray[i].loadingType; -} -PersLoadingType_e getLoadingType(const char* type) +static PersLoadingType_e getLoadingType(const char* type) { PersLoadingType_e persLoadingType = LoadType_Undefined; @@ -102,12 +98,8 @@ PersLoadingType_e getLoadingType(const char* type) return persLoadingType; } -PersInitType_e getCustomInitType(int i) -{ - return gCustomLibArray[i].initFunction; -} -PersInitType_e getInitType(const char* policy) +static PersInitType_e getInitType(const char* policy) { PersInitType_e persInitType = Init_Undefined; @@ -124,7 +116,16 @@ PersInitType_e getInitType(const char* policy) } +PersLoadingType_e getCustomLoadingType(int i) +{ + return gCustomLibArray[i].loadingType; +} + +PersInitType_e getCustomInitType(int i) +{ + return gCustomLibArray[i].initFunction; +} PersistenceCustomLibs_e custom_client_name_to_id(const char* lib_name, int substring) |