diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/inc/tx_api.h | 7 | ||||
| -rw-r--r-- | common/src/tx_mutex_priority_change.c | 16 |
2 files changed, 15 insertions, 8 deletions
diff --git a/common/inc/tx_api.h b/common/inc/tx_api.h index bed139cd..c79c635c 100644 --- a/common/inc/tx_api.h +++ b/common/inc/tx_api.h @@ -26,7 +26,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* tx_api.h PORTABLE C */ -/* 6.1.5 */ +/* 6.1.6 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -66,6 +66,9 @@ /* add option to remove FileX */ /* pointer, */ /* resulting in version 6.1.5 */ +/* 04-02-2021 Scott Larson Modified comment(s), and */ +/* update patch number, */ +/* resulting in version 6.1.6 */ /* */ /**************************************************************************/ @@ -98,7 +101,7 @@ extern "C" { #define AZURE_RTOS_THREADX #define THREADX_MAJOR_VERSION 6 #define THREADX_MINOR_VERSION 1 -#define THREADX_PATCH_VERSION 5 +#define THREADX_PATCH_VERSION 6 /* Define the following symbol for backward compatibility */ #define EL_PRODUCT_THREADX diff --git a/common/src/tx_mutex_priority_change.c b/common/src/tx_mutex_priority_change.c index c5f58869..809d0a21 100644 --- a/common/src/tx_mutex_priority_change.c +++ b/common/src/tx_mutex_priority_change.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _tx_mutex_priority_change PORTABLE C */ -/* 6.1 */ +/* 6.1.6 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -70,14 +70,18 @@ /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 05-19-2020 William E. Lamie Initial Version 6.0 */ -/* 09-30-2020 William E. Lamie Modified comment(s), and */ +/* 05-19-2020 William E. Lamie Initial Version 6.0 */ +/* 09-30-2020 William E. Lamie Modified comment(s), and */ /* change thread state from */ /* TX_SUSPENDED to */ /* TX_PRIORITY_CHANGE before */ /* calling */ /* _tx_thread_system_suspend, */ /* resulting in version 6.1 */ +/* 04-02-2021 Scott Larson Modified comments, fixed */ +/* mapping current thread's */ +/* priority rather than next, */ +/* resulting in version 6.1.6 */ /* */ /**************************************************************************/ VOID _tx_mutex_priority_change(TX_THREAD *thread_ptr, UINT new_priority) @@ -308,15 +312,15 @@ UINT map_index; #if TX_MAX_PRIORITIES > 32 /* Calculate the index into the bit map array. */ - map_index = (next_execute_ptr -> tx_thread_priority)/ ((UINT) 32); + map_index = (thread_ptr -> tx_thread_priority)/ ((UINT) 32); /* Set the active bit to remember that the preempt map has something set. */ - TX_DIV32_BIT_SET(next_execute_ptr -> tx_thread_priority, priority_bit) + TX_DIV32_BIT_SET(thread_ptr -> tx_thread_priority, priority_bit) _tx_thread_preempted_map_active = _tx_thread_preempted_map_active | priority_bit; #endif /* Remember that this thread was preempted by a thread above the thread's threshold. */ - TX_MOD32_BIT_SET(next_execute_ptr -> tx_thread_priority, priority_bit) + TX_MOD32_BIT_SET(thread_ptr -> tx_thread_priority, priority_bit) _tx_thread_preempted_maps[MAP_INDEX] = _tx_thread_preempted_maps[MAP_INDEX] | priority_bit; } #endif |
