summaryrefslogtreecommitdiff
path: root/common/src/tx_mutex_priority_change.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/tx_mutex_priority_change.c')
-rw-r--r--common/src/tx_mutex_priority_change.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/common/src/tx_mutex_priority_change.c b/common/src/tx_mutex_priority_change.c
index 6bb905d1..c5f58869 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.0 */
+/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
@@ -71,6 +71,13 @@
/* DATE NAME DESCRIPTION */
/* */
/* 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 */
/* */
/**************************************************************************/
VOID _tx_mutex_priority_change(TX_THREAD *thread_ptr, UINT new_priority)
@@ -139,8 +146,8 @@ UINT map_index;
/* Increment the preempt disable flag. */
_tx_thread_preempt_disable++;
- /* Set the state to suspended. */
- thread_ptr -> tx_thread_state = TX_SUSPENDED;
+ /* Set the state to priority change. */
+ thread_ptr -> tx_thread_state = TX_PRIORITY_CHANGE;
/* Call actual non-interruptable thread suspension routine. */
_tx_thread_system_ni_suspend(thread_ptr, ((ULONG) 0));
@@ -175,8 +182,8 @@ UINT map_index;
/* Increment the preempt disable flag. */
_tx_thread_preempt_disable = _tx_thread_preempt_disable + ((UINT) 2);
- /* Set the state to suspended. */
- thread_ptr -> tx_thread_state = TX_SUSPENDED;
+ /* Set the state to priority change. */
+ thread_ptr -> tx_thread_state = TX_PRIORITY_CHANGE;
/* Set the suspending flag. */
thread_ptr -> tx_thread_suspending = TX_TRUE;