Release 6.1.9

This commit is contained in:
Yuxin Zhou
2021-10-14 00:51:26 +00:00
parent 215df45d4b
commit 1af8404c54
1812 changed files with 60698 additions and 249862 deletions

View File

@@ -12,8 +12,8 @@
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** ThreadX Component */
/** */
/** Timer */
/** */
@@ -30,55 +30,57 @@
#include "tx_timer.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _tx_timer_deactivate PORTABLE C */
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _tx_timer_deactivate PORTABLE C */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* This function deactivates the specified application timer. */
/* */
/* INPUT */
/* */
/* timer_ptr Pointer to timer control block */
/* */
/* OUTPUT */
/* */
/* TX_SUCCESS Always returns success */
/* */
/* CALLS */
/* */
/* None */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* */
/* This function deactivates the specified application timer. */
/* */
/* INPUT */
/* */
/* timer_ptr Pointer to timer control block */
/* */
/* OUTPUT */
/* */
/* TX_SUCCESS Always returns success */
/* */
/* CALLS */
/* */
/* None */
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* */
/**************************************************************************/
UINT _tx_timer_deactivate(TX_TIMER *timer_ptr)
{
TX_INTERRUPT_SAVE_AREA
TX_TIMER_INTERNAL *internal_ptr;
TX_TIMER_INTERNAL *internal_ptr;
TX_TIMER_INTERNAL **list_head;
TX_TIMER_INTERNAL *next_timer;
TX_TIMER_INTERNAL *previous_timer;
ULONG ticks_left;
TX_TIMER_INTERNAL *next_timer;
TX_TIMER_INTERNAL *previous_timer;
ULONG ticks_left;
UINT active_timer_list;
/* Setup internal timer pointer. */
internal_ptr = &(timer_ptr -> tx_timer_internal);
@@ -123,7 +125,7 @@ UINT active_timer_list;
active_timer_list = TX_TRUE;
}
}
/* Determine if the timer is on active timer list. */
if (active_timer_list == TX_TRUE)
{
@@ -137,7 +139,7 @@ UINT active_timer_list;
if (TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT(list_head) >= TX_TIMER_INDIRECT_TO_VOID_POINTER_CONVERT(_tx_timer_current_ptr))
{
/* Calculate ticks left to expiration - just the difference between this
/* Calculate ticks left to expiration - just the difference between this
timer's entry and the current timer pointer. */
ticks_left = (ULONG) (TX_TIMER_POINTER_DIF(list_head,_tx_timer_current_ptr)) + ((ULONG) 1);
}
@@ -146,57 +148,57 @@ UINT active_timer_list;
/* Calculate the ticks left with a wrapped list condition. */
ticks_left = (ULONG) (TX_TIMER_POINTER_DIF(list_head,_tx_timer_list_start));
ticks_left = ticks_left + (ULONG) ((TX_TIMER_POINTER_DIF(_tx_timer_list_end, _tx_timer_current_ptr)) + ((ULONG) 1));
}
/* Adjust the remaining ticks accordingly. */
if (internal_ptr -> tx_timer_internal_remaining_ticks > TX_TIMER_ENTRIES)
{
/* Subtract off the last full pass through the timer list and add the
time left. */
internal_ptr -> tx_timer_internal_remaining_ticks =
internal_ptr -> tx_timer_internal_remaining_ticks =
(internal_ptr -> tx_timer_internal_remaining_ticks - TX_TIMER_ENTRIES) + ticks_left;
}
else
{
/* Just put the ticks left into the timer's remaining ticks. */
internal_ptr -> tx_timer_internal_remaining_ticks = ticks_left;
}
}
else
{
/* Determine if this is timer has just expired. */
if (_tx_timer_expired_timer_ptr != internal_ptr)
{
/* No, it hasn't expired. Now check for remaining time greater than the list
size. */
if (internal_ptr -> tx_timer_internal_remaining_ticks > TX_TIMER_ENTRIES)
{
/* Adjust the remaining ticks. */
internal_ptr -> tx_timer_internal_remaining_ticks =
internal_ptr -> tx_timer_internal_remaining_ticks =
internal_ptr -> tx_timer_internal_remaining_ticks - TX_TIMER_ENTRIES;
}
else
{
/* Set the remaining time to the reactivation time. */
internal_ptr -> tx_timer_internal_remaining_ticks = internal_ptr -> tx_timer_internal_re_initialize_ticks;
}
}
else
{
/* Set the remaining time to the reactivation time. */
internal_ptr -> tx_timer_internal_remaining_ticks = internal_ptr -> tx_timer_internal_re_initialize_ticks;
}
}
}
}
/* Pickup the next timer. */
next_timer = internal_ptr -> tx_timer_internal_active_next;
@@ -228,7 +230,7 @@ UINT active_timer_list;
if (*(list_head) == internal_ptr)
{
/* Update the next timer in the list with the list head
/* Update the next timer in the list with the list head
pointer. */
next_timer -> tx_timer_internal_list_head = list_head;