From 3f5e8f31d7ecdbbcee17f8c4ef7f305a1cb66463 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 12 Nov 2020 17:23:22 -0500 Subject: [PATCH] Update #641, Doxygen comment corrections Add doxygen comment for flags parameter on OS_ModuleLoad Also correct the capitalization of parameters to the OS_ModuleSymbolLookup which caused them to be reported as undocumented. --- src/os/inc/osapi-os-loader.h | 7 ++++++- src/os/shared/src/osapi-module.c | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/os/inc/osapi-os-loader.h b/src/os/inc/osapi-os-loader.h index e71801427..c5a49053e 100644 --- a/src/os/inc/osapi-os-loader.h +++ b/src/os/inc/osapi-os-loader.h @@ -160,7 +160,7 @@ int32 OS_SymbolLookup(cpuaddr *symbol_address, const char *symbol_name); * @retval #OS_ERROR if the symbol could not be found * @retval #OS_INVALID_POINTER if one of the pointers passed in are NULL */ -int32 OS_ModuleSymbolLookup(osal_id_t module_id, cpuaddr *SymbolAddress, const char *SymbolName); +int32 OS_ModuleSymbolLookup(osal_id_t module_id, cpuaddr *symbol_address, const char *symbol_name); /*-------------------------------------------------------------------------------------*/ /** @@ -184,9 +184,14 @@ int32 OS_SymbolTableDump(const char *filename, uint32 size_limit); * * Loads an object file into the running operating system * + * The "flags" parameter may influence how the loaded module symbols are made + * available for use in the application. See #OS_MODULE_FLAG_LOCAL_SYMBOLS + * and #OS_MODULE_FLAG_GLOBAL_SYMBOLS for descriptions. + * * @param[out] module_id Non-zero OSAL ID corresponding to the loaded module * @param[in] module_name Name of module * @param[in] filename File containing the object code to load + * @param[in] flags Options for the loaded module * * @return Execution status, see @ref OSReturnCodes * @retval #OS_SUCCESS @copybrief OS_SUCCESS diff --git a/src/os/shared/src/osapi-module.c b/src/os/shared/src/osapi-module.c index 1c325d85e..96bbe4abb 100644 --- a/src/os/shared/src/osapi-module.c +++ b/src/os/shared/src/osapi-module.c @@ -397,7 +397,7 @@ int32 OS_SymbolLookup(cpuaddr *SymbolAddress, const char *SymbolName) * See description in API and header file for detail * *-----------------------------------------------------------------*/ -int32 OS_ModuleSymbolLookup(osal_id_t module_id, cpuaddr *SymbolAddress, const char *SymbolName) +int32 OS_ModuleSymbolLookup(osal_id_t module_id, cpuaddr *symbol_address, const char *symbol_name) { int32 return_code; int32 staticsym_status; @@ -407,7 +407,7 @@ int32 OS_ModuleSymbolLookup(osal_id_t module_id, cpuaddr *SymbolAddress, const c /* ** Check parameters */ - if ((SymbolAddress == NULL) || (SymbolName == NULL)) + if ((symbol_address == NULL) || (symbol_name == NULL)) { return (OS_INVALID_POINTER); } @@ -415,11 +415,11 @@ int32 OS_ModuleSymbolLookup(osal_id_t module_id, cpuaddr *SymbolAddress, const c return_code = OS_ObjectIdGetById(OS_LOCK_MODE_GLOBAL, LOCAL_OBJID_TYPE, module_id, &local_id, &record); if (return_code == OS_SUCCESS) { - return_code = OS_ModuleSymbolLookup_Impl(local_id, SymbolAddress, SymbolName); + return_code = OS_ModuleSymbolLookup_Impl(local_id, symbol_address, symbol_name); if (return_code != OS_SUCCESS) { /* look for a static symbol that also matches this module name */ - staticsym_status = OS_SymbolLookup_Static(SymbolAddress, SymbolName, record->name_entry); + staticsym_status = OS_SymbolLookup_Static(symbol_address, symbol_name, record->name_entry); /* * Only overwrite the return code if static lookup was successful.