Release 6.1.10
This commit is contained in:
@@ -10,15 +10,15 @@
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Module Manager */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Module Manager */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
@@ -30,50 +30,50 @@
|
||||
#include "txm_module.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _txm_module_manager_unload PORTABLE C */
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _txm_module_manager_unload PORTABLE C */
|
||||
/* 6.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* Scott Larson, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function unloads a previously loaded module. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* module_instance Module instance pointer */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* status Completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_byte_release Release data area */
|
||||
/* _tx_mutex_get Get protection mutex */
|
||||
/* _tx_mutex_put Release protection mutex */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function unloads a previously loaded module. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* module_instance Module instance pointer */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* status Completion status */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_byte_release Release data area */
|
||||
/* _tx_mutex_get Get protection mutex */
|
||||
/* _tx_mutex_put Release protection mutex */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 09-30-2020 Scott Larson Initial Version 6.1 */
|
||||
/* 09-30-2020 Scott Larson Initial Version 6.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _txm_module_manager_unload(TXM_MODULE_INSTANCE *module_instance)
|
||||
{
|
||||
|
||||
TX_INTERRUPT_SAVE_AREA
|
||||
|
||||
|
||||
TXM_MODULE_INSTANCE *next_module, *previous_module;
|
||||
CHAR *memory_ptr;
|
||||
|
||||
@@ -81,11 +81,11 @@ CHAR *memory_ptr;
|
||||
/* Check for interrupt call. */
|
||||
if (TX_THREAD_GET_SYSTEM_STATE() != 0)
|
||||
{
|
||||
|
||||
|
||||
/* Now, make sure the call is from an interrupt and not initialization. */
|
||||
if (TX_THREAD_GET_SYSTEM_STATE() < TX_INITIALIZE_IN_PROGRESS)
|
||||
{
|
||||
|
||||
|
||||
/* Invalid caller of this function, return appropriate error code. */
|
||||
return(TX_CALLER_ERROR);
|
||||
}
|
||||
@@ -94,15 +94,15 @@ CHAR *memory_ptr;
|
||||
/* Determine if the module manager has not been initialized yet. */
|
||||
if (_txm_module_manager_ready != TX_TRUE)
|
||||
{
|
||||
|
||||
|
||||
/* Module manager has not been initialized. */
|
||||
return(TX_NOT_AVAILABLE);
|
||||
return(TX_NOT_AVAILABLE);
|
||||
}
|
||||
|
||||
/* Determine if the module is valid. */
|
||||
if (module_instance == TX_NULL)
|
||||
{
|
||||
|
||||
|
||||
/* Invalid module pointer. */
|
||||
return(TX_PTR_ERROR);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ CHAR *memory_ptr;
|
||||
/* Determine if the module instance is in the state. */
|
||||
if ((module_instance -> txm_module_instance_state != TXM_MODULE_LOADED) && (module_instance -> txm_module_instance_state != TXM_MODULE_STOPPED))
|
||||
{
|
||||
|
||||
|
||||
/* Release the protection mutex. */
|
||||
_tx_mutex_put(&_txm_module_manager_mutex);
|
||||
|
||||
@@ -141,14 +141,14 @@ CHAR *memory_ptr;
|
||||
/* Determine if there was memory allocated for the code. */
|
||||
if (module_instance -> txm_module_instance_code_allocation_ptr)
|
||||
{
|
||||
|
||||
|
||||
/* Yes, release the module's code memory. */
|
||||
memory_ptr = module_instance -> txm_module_instance_code_allocation_ptr;
|
||||
|
||||
/* Release the module's data memory. */
|
||||
_tx_byte_release(memory_ptr);
|
||||
}
|
||||
|
||||
|
||||
/* Temporarily disable interrupts. */
|
||||
TX_DISABLE
|
||||
|
||||
@@ -158,7 +158,7 @@ CHAR *memory_ptr;
|
||||
|
||||
/* Call port-specific unload function. */
|
||||
TXM_MODULE_MANAGER_MODULE_UNLOAD(module_instance);
|
||||
|
||||
|
||||
/* Remove the module from the linked list of loaded modules. */
|
||||
|
||||
/* See if the module is the only one on the list. */
|
||||
@@ -180,9 +180,9 @@ CHAR *memory_ptr;
|
||||
/* See if we have to update the created list head pointer. */
|
||||
if (_txm_module_manager_loaded_list_ptr == module_instance)
|
||||
{
|
||||
|
||||
|
||||
/* Yes, move the head pointer to the next link. */
|
||||
_txm_module_manager_loaded_list_ptr = next_module;
|
||||
_txm_module_manager_loaded_list_ptr = next_module;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user