Skip to content

Commit

Permalink
Update #641, Doxygen comment corrections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jphickey committed Nov 12, 2020
1 parent 8a9e736 commit 3f5e8f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/os/inc/osapi-os-loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*-------------------------------------------------------------------------------------*/
/**
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/os/shared/src/osapi-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -407,19 +407,19 @@ 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);
}

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.
Expand Down

0 comments on commit 3f5e8f3

Please sign in to comment.