diff options
Diffstat (limited to 'common_smp')
| -rw-r--r-- | common_smp/inc/tx_api.h | 80 | ||||
| -rw-r--r-- | common_smp/src/tx_event_flags_get.c | 16 | ||||
| -rw-r--r-- | common_smp/src/tx_thread_create.c | 9 |
3 files changed, 90 insertions, 15 deletions
diff --git a/common_smp/inc/tx_api.h b/common_smp/inc/tx_api.h index 5bd9bd7a..ba2ba0a7 100644 --- a/common_smp/inc/tx_api.h +++ b/common_smp/inc/tx_api.h @@ -26,7 +26,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* tx_api.h PORTABLE SMP */ -/* 6.1.12 */ +/* 6.2.0 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -78,6 +78,10 @@ /* 07-29-2022 Scott Larson Modified comment(s), */ /* update patch number, */ /* resulting in version 6.1.12 */ +/* 10-31-2022 Scott Larson Modified comment(s), */ +/* add extension macros, */ +/* update version numbers, */ +/* resulting in version 6.2.0 */ /* */ /**************************************************************************/ @@ -129,8 +133,8 @@ extern "C" { #define AZURE_RTOS_THREADX #define THREADX_MAJOR_VERSION 6 -#define THREADX_MINOR_VERSION 1 -#define THREADX_PATCH_VERSION 12 +#define THREADX_MINOR_VERSION 2 +#define THREADX_PATCH_VERSION 0 /* Define the following symbol for backward compatibility */ #define EL_PRODUCT_THREADX @@ -228,6 +232,76 @@ extern "C" { #define TX_FEATURE_NOT_ENABLED ((UINT) 0xFF) +#ifdef TX_64_BIT + +#ifndef TX_THREAD_EXTENSION_PTR_SET +#define TX_THREAD_EXTENSION_PTR_SET(a, b) { \ + TX_THREAD *thread_ptr; \ + thread_ptr = (TX_THREAD *) (a); \ + (thread_ptr -> tx_thread_extension_ptr) = (VOID *)(b); \ + } +#endif /* TX_THREAD_EXTENSION_PTR_SET */ + +#ifndef TX_THREAD_EXTENSION_PTR_GET +#define TX_THREAD_EXTENSION_PTR_GET(a, b, c) { \ + TX_PARAMETER_NOT_USED(c); \ + TX_THREAD *thread_ptr; \ + thread_ptr = tx_thread_identify(); \ + while(1)\ + { \ + if (thread_ptr -> tx_thread_extension_ptr) \ + { \ + (a) = (b *)(thread_ptr -> tx_thread_extension_ptr); \ + break; \ + } \ + tx_thread_sleep(1); \ + } \ + } +#endif /* TX_THREAD_EXTENSION_PTR_GET */ + +#ifndef TX_TIMER_EXTENSION_PTR_SET +#define TX_TIMER_EXTENSION_PTR_SET(a, b) { \ + TX_TIMER *timer_ptr; \ + timer_ptr = (TX_TIMER *) (a); \ + (timer_ptr -> tx_timer_internal.tx_timer_internal_extension_ptr) = (VOID *)(b); \ + } +#endif /* TX_TIMER_EXTENSION_PTR_SET */ + +#ifndef TX_TIMER_EXTENSION_PTR_GET +#define TX_TIMER_EXTENSION_PTR_GET(a, b, c) { \ + TX_PARAMETER_NOT_USED(c); \ + if (!_tx_timer_expired_timer_ptr -> tx_timer_internal_extension_ptr) \ + return; \ + (a) = (b *)(_tx_timer_expired_timer_ptr -> tx_timer_internal_extension_ptr); \ + } +#endif /* TX_TIMER_EXTENSION_PTR_GET */ + +#else /* not 64 bit */ + +#ifndef TX_THREAD_EXTENSION_PTR_SET +#define TX_THREAD_EXTENSION_PTR_SET(a, b) +#endif /* TX_THREAD_EXTENSION_PTR_SET */ + +#ifndef TX_THREAD_EXTENSION_PTR_GET +#define TX_THREAD_EXTENSION_PTR_GET(a, b, c) { \ + (a) = (b *)(c); \ + } +#endif /* TX_THREAD_EXTENSION_PTR_GET */ + +#ifndef TX_TIMER_EXTENSION_PTR_SET +#define TX_TIMER_EXTENSION_PTR_SET(a, b) +#endif /* TX_TIMER_EXTENSION_PTR_SET */ + +#ifndef TX_TIMER_EXTENSION_PTR_GET +#define TX_TIMER_EXTENSION_PTR_GET(a, b, c) { \ + (a) = (b *)(c); \ + } +#endif /* TX_TIMER_EXTENSION_PTR_GET */ + +#endif /* TX_64_BIT */ + + + /* Define the common timer tick reference for use by other middleware components. The default value is 10ms, but may be replaced by a port specific version in tx_port.h or by the user as a compilation option. */ diff --git a/common_smp/src/tx_event_flags_get.c b/common_smp/src/tx_event_flags_get.c index aba42c6b..3cc62178 100644 --- a/common_smp/src/tx_event_flags_get.c +++ b/common_smp/src/tx_event_flags_get.c @@ -36,7 +36,7 @@ /* FUNCTION RELEASE */ /* */ /* _tx_event_flags_get PORTABLE C */ -/* 6.1.11 */ +/* 6.2.0 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -79,6 +79,9 @@ /* 04-25-2022 Scott Larson Modified comment(s), */ /* handle 0 flags case, */ /* resulting in version 6.1.11 */ +/* 10-31-2022 Scott Larson Modified comment(s), always */ +/* return actual flags, */ +/* resulting in version 6.2.0 */ /* */ /**************************************************************************/ UINT _tx_event_flags_get(TX_EVENT_FLAGS_GROUP *group_ptr, ULONG requested_flags, @@ -125,6 +128,9 @@ UINT interrupted_set_request; /* Pickup current flags. */ current_flags = group_ptr -> tx_event_flags_group_current; + /* Return the actual event flags and apply delayed clearing. */ + *actual_flags_ptr = current_flags & ~group_ptr -> tx_event_flags_group_delayed_clear; + /* Apply the event flag option mask. */ and_request = (get_option & TX_AND); @@ -158,9 +164,6 @@ UINT interrupted_set_request; if (flags_satisfied != ((ULONG) 0)) { - /* Return the actual event flags that satisfied the request. */ - *actual_flags_ptr = current_flags; - /* Pickup the clear bit. */ clear_request = (get_option & TX_EVENT_FLAGS_CLEAR_MASK); @@ -221,9 +224,6 @@ UINT interrupted_set_request; /* Yes, this request can be handled immediately. */ - /* Return the actual event flags that satisfied the request. */ - *actual_flags_ptr = current_flags; - /* Pickup the clear bit. */ clear_request = (get_option & TX_EVENT_FLAGS_CLEAR_MASK); @@ -274,7 +274,7 @@ UINT interrupted_set_request; #endif else { - + /* flags_satisfied is 0. */ /* Determine if the request specifies suspension. */ if (wait_option != TX_NO_WAIT) { diff --git a/common_smp/src/tx_thread_create.c b/common_smp/src/tx_thread_create.c index a99af7e6..2c799a9b 100644 --- a/common_smp/src/tx_thread_create.c +++ b/common_smp/src/tx_thread_create.c @@ -37,7 +37,7 @@ /* FUNCTION RELEASE */ /* */ /* _tx_thread_create PORTABLE SMP */ -/* 6.1.8 */ +/* 6.2.0 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,10 @@ /* resulting in version 6.1.3 */ /* 08-02-2021 Scott Larson Removed unneeded cast, */ /* resulting in version 6.1.8 */ +/* 10-31-2022 Scott Larson Removed ifdef block to always */ +/* restore interrupts at end */ +/* of if block, */ +/* resulting in version 6.2.0 */ /* */ /**************************************************************************/ UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, @@ -344,11 +348,8 @@ ALIGN_TYPE updated_stack_start; #endif } -#ifndef TX_NOT_INTERRUPTABLE - /* Restore interrupts. */ TX_RESTORE -#endif } else { |
