summaryrefslogtreecommitdiff
path: root/common/inc/tx_api.h
diff options
context:
space:
mode:
authorTiejun Zhou <[email protected]>2022-10-26 23:41:13 +0000
committerTiejun Zhou <[email protected]>2022-10-26 23:41:13 +0000
commit3e8e85cdc1e51f9de577457377a4f9a4f6b9b82f (patch)
tree861c0ab74e5dc5de7509b4b85f5e75dd74457117 /common/inc/tx_api.h
parentb871c33620f9b58a83e92a33f4ca00025e850c7f (diff)
Release 6.2.0v6.2.0_rel
Diffstat (limited to 'common/inc/tx_api.h')
-rw-r--r--common/inc/tx_api.h88
1 files changed, 83 insertions, 5 deletions
diff --git a/common/inc/tx_api.h b/common/inc/tx_api.h
index d4d8e500..9974c977 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.12 */
+/* 6.2.0 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
@@ -89,6 +89,11 @@
/* 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 EPK typedef, */
+/* update version numbers, */
+/* resulting in version 6.2.0 */
/* */
/**************************************************************************/
@@ -115,6 +120,9 @@ extern "C" {
#include "tx_port.h"
+#if (defined(TX_EXECUTION_PROFILE_ENABLE) && !defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY))
+#include "tx_execution_profile.h"
+#endif
/* Define basic constants for the ThreadX kernel. */
@@ -124,8 +132,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
@@ -223,6 +231,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. */
@@ -529,8 +607,8 @@ typedef struct TX_THREAD_STRUCT
For Azure RTOS 6, user shall use TX_EXECUTION_PROFILE_ENABLE instead of TX_ENABLE_EXECUTION_CHANGE_NOTIFY,
and SHALL NOT add variables to TX_THREAD_EXTENSION_3. */
#if (defined(TX_EXECUTION_PROFILE_ENABLE) && !defined(TX_ENABLE_EXECUTION_CHANGE_NOTIFY))
- unsigned long long tx_thread_execution_time_total;
- unsigned long long tx_thread_execution_time_last_start;
+ EXECUTION_TIME tx_thread_execution_time_total;
+ EXECUTION_TIME_SOURCE_TYPE tx_thread_execution_time_last_start;
#endif
/* Define suspension sequence number. This is used to ensure suspension is still valid when