Skip to content

Commit cef9cb2

Browse files
committed
Release 6.1.11
1 parent f851772 commit cef9cb2

File tree

784 files changed

+57387
-100874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

784 files changed

+57387
-100874
lines changed

common/inc/tx_api.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* APPLICATION INTERFACE DEFINITION RELEASE */
2727
/* */
2828
/* tx_api.h PORTABLE C */
29-
/* 6.1.10 */
29+
/* 6.1.11 */
3030
/* AUTHOR */
3131
/* */
3232
/* William E. Lamie, Microsoft Corporation */
@@ -82,6 +82,10 @@
8282
/* add unused parameter macro, */
8383
/* update patch number, */
8484
/* resulting in version 6.1.10 */
85+
/* 04-25-2022 Wenhui Xie Modified comment(s), */
86+
/* optimized the definition of */
87+
/* TX_TIMER_TICKS_PER_SECOND, */
88+
/* resulting in version 6.1.11 */
8589
/* */
8690
/**************************************************************************/
8791

@@ -118,7 +122,7 @@ extern "C" {
118122
#define AZURE_RTOS_THREADX
119123
#define THREADX_MAJOR_VERSION 6
120124
#define THREADX_MINOR_VERSION 1
121-
#define THREADX_PATCH_VERSION 10
125+
#define THREADX_PATCH_VERSION 11
122126

123127
/* Define the following symbol for backward compatibility */
124128
#define EL_PRODUCT_THREADX
@@ -221,7 +225,7 @@ extern "C" {
221225
as a compilation option. */
222226

223227
#ifndef TX_TIMER_TICKS_PER_SECOND
224-
#define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100)
228+
#define TX_TIMER_TICKS_PER_SECOND (100UL)
225229
#endif
226230

227231

common/inc/tx_user_sample.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* PORT SPECIFIC C INFORMATION RELEASE */
2727
/* */
2828
/* tx_user.h PORTABLE C */
29-
/* 6.1.9 */
29+
/* 6.1.11 */
3030
/* */
3131
/* AUTHOR */
3232
/* */
@@ -58,6 +58,10 @@
5858
/* user-configurable symbol */
5959
/* TX_TIMER_TICKS_PER_SECOND */
6060
/* resulting in version 6.1.9 */
61+
/* 04-25-2022 Wenhui Xie Modified comment(s), */
62+
/* optimized the definition of */
63+
/* TX_TIMER_TICKS_PER_SECOND, */
64+
/* resulting in version 6.1.11 */
6165
/* */
6266
/**************************************************************************/
6367

@@ -116,7 +120,7 @@
116120
Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */
117121

118122
/*
119-
#define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100)
123+
#define TX_TIMER_TICKS_PER_SECOND (100UL)
120124
*/
121125

122126
/* Determine if there is a FileX pointer in the thread control block.

common/src/tx_event_flags_get.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/* FUNCTION RELEASE */
3737
/* */
3838
/* _tx_event_flags_get PORTABLE C */
39-
/* 6.1 */
39+
/* 6.1.11 */
4040
/* AUTHOR */
4141
/* */
4242
/* William E. Lamie, Microsoft Corporation */
@@ -73,9 +73,12 @@
7373
/* */
7474
/* DATE NAME DESCRIPTION */
7575
/* */
76-
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
77-
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
76+
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
77+
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
7878
/* resulting in version 6.1 */
79+
/* 04-25-2022 Scott Larson Modified comment(s), */
80+
/* handle 0 flags case, */
81+
/* resulting in version 6.1.11 */
7982
/* */
8083
/**************************************************************************/
8184
UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags,
@@ -276,11 +279,12 @@ UINT interrupted_set_request;
276279
if (wait_option != TX_NO_WAIT)
277280
{
278281

279-
/* Determine if the preempt disable flag is non-zero. */
280-
if (_tx_thread_preempt_disable != ((UINT) 0))
282+
/* Determine if the preempt disable flag is non-zero OR the requested events is 0. */
283+
if ((_tx_thread_preempt_disable != ((UINT) 0)) || (requested_flags == (UINT) 0))
281284
{
282285

283-
/* Suspension is not allowed if the preempt disable flag is non-zero at this point, return error completion. */
286+
/* Suspension is not allowed if the preempt disable flag is non-zero at this point,
287+
or if requested_flags is 0, return error completion. */
284288
status = TX_NO_EVENTS;
285289
}
286290
else

common/src/tx_event_flags_set.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/* FUNCTION RELEASE */
3737
/* */
3838
/* _tx_event_flags_set PORTABLE C */
39-
/* 6.1 */
39+
/* 6.1.11 */
4040
/* AUTHOR */
4141
/* */
4242
/* William E. Lamie, Microsoft Corporation */
@@ -72,9 +72,13 @@
7272
/* */
7373
/* DATE NAME DESCRIPTION */
7474
/* */
75-
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
76-
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
75+
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
76+
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
7777
/* resulting in version 6.1 */
78+
/* 04-25-2022 William E. Lamie Modified comment(s), and */
79+
/* added corrected preemption */
80+
/* check logic, resulting in */
81+
/* version 6.1.11 */
7882
/* */
7983
/**************************************************************************/
8084
UINT _tx_event_flags_set(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG flags_to_set, UINT set_option)
@@ -264,9 +268,6 @@ VOID (*events_set_notify)(struct TX_EVENT_FLAGS_GROUP_STRUCT *notify_
264268
/* Yes, resume the thread and apply any event flag
265269
clearing. */
266270

267-
/* Set the preempt check flag. */
268-
preempt_check = TX_TRUE;
269-
270271
/* Return the actual event flags that satisfied the request. */
271272
suspend_info_ptr = TX_VOID_TO_ULONG_POINTER_CONVERT(thread_ptr -> tx_thread_additional_suspend_info);
272273
*suspend_info_ptr = current_event_flags;
@@ -336,6 +337,11 @@ VOID (*events_set_notify)(struct TX_EVENT_FLAGS_GROUP_STRUCT *notify_
336337
/* Disable preemption while we process the suspended list. */
337338
_tx_thread_preempt_disable++;
338339

340+
/* Since we have temporarily disabled preemption globally, set the preempt
341+
check flag to check for any preemption condition - including from
342+
unrelated ISR processing. */
343+
preempt_check = TX_TRUE;
344+
339345
/* Loop to examine all of the suspended threads. */
340346
do
341347
{
@@ -419,9 +425,6 @@ VOID (*events_set_notify)(struct TX_EVENT_FLAGS_GROUP_STRUCT *notify_
419425

420426
/* Yes, this request can be handled now. */
421427

422-
/* Set the preempt check flag. */
423-
preempt_check = TX_TRUE;
424-
425428
/* Determine if the thread is still suspended on the event flag group. If not, a wait
426429
abort must have been done from an ISR. */
427430
if (thread_ptr -> tx_thread_state == TX_EVENT_FLAG)

common/src/tx_initialize_kernel_enter.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#include "tx_thread.h"
3131
#include "tx_timer.h"
3232

33+
#if defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE)
34+
extern VOID _tx_execution_initialize(VOID);
35+
#endif
3336

3437
/* Define any port-specific scheduling data structures. */
3538

@@ -46,7 +49,7 @@ TX_SAFETY_CRITICAL_EXCEPTION_HANDLER
4649
/* FUNCTION RELEASE */
4750
/* */
4851
/* _tx_initialize_kernel_enter PORTABLE C */
49-
/* 6.1 */
52+
/* 6.1.11 */
5053
/* AUTHOR */
5154
/* */
5255
/* William E. Lamie, Microsoft Corporation */
@@ -84,9 +87,12 @@ TX_SAFETY_CRITICAL_EXCEPTION_HANDLER
8487
/* */
8588
/* DATE NAME DESCRIPTION */
8689
/* */
87-
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
88-
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
90+
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
91+
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
8992
/* resulting in version 6.1 */
93+
/* 04-25-2022 Scott Larson Modified comment(s), */
94+
/* added EPK initialization, */
95+
/* resulting in version 6.1.11 */
9096
/* */
9197
/**************************************************************************/
9298
VOID _tx_initialize_kernel_enter(VOID)
@@ -138,6 +144,11 @@ VOID _tx_initialize_kernel_enter(VOID)
138144
/* Call any port specific pre-scheduler processing. */
139145
TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION
140146

147+
#if defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY) || defined(TX_EXECUTION_PROFILE_ENABLE)
148+
/* Initialize Execution Profile Kit. */
149+
_tx_execution_initialize();
150+
#endif
151+
141152
/* Enter the scheduling loop to start executing threads! */
142153
_tx_thread_schedule();
143154

common_smp/inc/tx_api.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* APPLICATION INTERFACE DEFINITION RELEASE */
2727
/* */
2828
/* tx_api.h PORTABLE SMP */
29-
/* 6.1.10 */
29+
/* 6.1.11 */
3030
/* AUTHOR */
3131
/* */
3232
/* William E. Lamie, Microsoft Corporation */
@@ -71,6 +71,10 @@
7171
/* add unused parameter macro, */
7272
/* update patch number, */
7373
/* resulting in version 6.1.10 */
74+
/* 04-25-2022 Wenhui Xie Modified comment(s), */
75+
/* optimized the definition of */
76+
/* TX_TIMER_TICKS_PER_SECOND, */
77+
/* resulting in version 6.1.11 */
7478
/* */
7579
/**************************************************************************/
7680

@@ -123,7 +127,7 @@ extern "C" {
123127
#define AZURE_RTOS_THREADX
124128
#define THREADX_MAJOR_VERSION 6
125129
#define THREADX_MINOR_VERSION 1
126-
#define THREADX_PATCH_VERSION 10
130+
#define THREADX_PATCH_VERSION 11
127131

128132
/* Define the following symbol for backward compatibility */
129133
#define EL_PRODUCT_THREADX
@@ -226,7 +230,7 @@ extern "C" {
226230
as a compilation option. */
227231

228232
#ifndef TX_TIMER_TICKS_PER_SECOND
229-
#define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100)
233+
#define TX_TIMER_TICKS_PER_SECOND (100UL)
230234
#endif
231235

232236

common_smp/inc/tx_user_sample.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/* PORT SPECIFIC C INFORMATION RELEASE */
2727
/* */
2828
/* tx_user.h PORTABLE C */
29-
/* 6.1.9 */
29+
/* 6.1.11 */
3030
/* */
3131
/* AUTHOR */
3232
/* */
@@ -58,6 +58,10 @@
5858
/* user-configurable symbol */
5959
/* TX_TIMER_TICKS_PER_SECOND */
6060
/* resulting in version 6.1.9 */
61+
/* 04-25-2022 Wenhui Xie Modified comment(s), */
62+
/* optimized the definition of */
63+
/* TX_TIMER_TICKS_PER_SECOND, */
64+
/* resulting in version 6.1.11 */
6165
/* */
6266
/**************************************************************************/
6367

@@ -116,7 +120,7 @@
116120
Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */
117121

118122
/*
119-
#define TX_TIMER_TICKS_PER_SECOND ((ULONG) 100)
123+
#define TX_TIMER_TICKS_PER_SECOND (100UL)
120124
*/
121125

122126
/* Determine if there is a FileX pointer in the thread control block.

common_smp/src/tx_event_flags_get.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/* FUNCTION RELEASE */
3737
/* */
3838
/* _tx_event_flags_get PORTABLE C */
39-
/* 6.1 */
39+
/* 6.1.11 */
4040
/* AUTHOR */
4141
/* */
4242
/* William E. Lamie, Microsoft Corporation */
@@ -73,9 +73,12 @@
7373
/* */
7474
/* DATE NAME DESCRIPTION */
7575
/* */
76-
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
77-
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
76+
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
77+
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
7878
/* resulting in version 6.1 */
79+
/* 04-25-2022 Scott Larson Modified comment(s), */
80+
/* handle 0 flags case, */
81+
/* resulting in version 6.1.11 */
7982
/* */
8083
/**************************************************************************/
8184
UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags,
@@ -276,11 +279,12 @@ UINT interrupted_set_request;
276279
if (wait_option != TX_NO_WAIT)
277280
{
278281

279-
/* Determine if the preempt disable flag is non-zero. */
280-
if (_tx_thread_preempt_disable != ((UINT) 0))
282+
/* Determine if the preempt disable flag is non-zero OR the requested events is 0. */
283+
if ((_tx_thread_preempt_disable != ((UINT) 0)) || (requested_flags == (UINT) 0))
281284
{
282285

283-
/* Suspension is not allowed if the preempt disable flag is non-zero at this point, return error completion. */
286+
/* Suspension is not allowed if the preempt disable flag is non-zero at this point,
287+
or if requested_flags is 0, return error completion. */
284288
status = TX_NO_EVENTS;
285289
}
286290
else

0 commit comments

Comments
 (0)