summaryrefslogtreecommitdiff
path: root/ports_smp/linux/gnu/inc
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-10-02 10:42:44 -0400
committerGitHub <[email protected]>2026-10-02 10:42:44 -0400
commit93387b0a60382a29579bbad5045c68328e3751df (patch)
tree42be790d602cb76f55090e5a7c418df7ea2b3428 /ports_smp/linux/gnu/inc
parent44d7c95c582d415c4ad84527180b29c93c3bf664 (diff)
parent28281cd5647d4671236ca08d19bd18ed15b2265a (diff)
Merge pull request #783 from eclipse-threadx/devv6.5.2.202603_rel
Merged changes ahead of the v6.5.2.202603 release
Diffstat (limited to 'ports_smp/linux/gnu/inc')
-rw-r--r--ports_smp/linux/gnu/inc/tx_port.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/ports_smp/linux/gnu/inc/tx_port.h b/ports_smp/linux/gnu/inc/tx_port.h
index bb1021dd..b7da882a 100644
--- a/ports_smp/linux/gnu/inc/tx_port.h
+++ b/ports_smp/linux/gnu/inc/tx_port.h
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -373,13 +375,21 @@ void _tx_linux_debug_entry_insert(char *action, char *file, unsigned long lin
*/
-#ifndef TX_MISRA_ENABLE
+/* The clock below is read for every trace event in both builds. The MISRA form
+ of the in-line insert takes the time stamp as an argument rather than reading
+ it itself, so the macro has to be an expression; that is why it carries no
+ trailing semicolon. */
+
#ifndef TX_TRACE_TIME_SOURCE
#define TX_TRACE_TIME_SOURCE ((ULONG) (_tx_linux_time_stamp.tv_nsec))
#endif
-#else
+
+/* Declared here rather than used: this port supplies its own time stamp above,
+ but the generic definition in common_smp/src/tx_misra.c is compiled for this
+ port and needs a declaration in scope. */
+
+#ifdef TX_MISRA_ENABLE
ULONG _tx_misra_time_stamp_get(VOID);
-#define TX_TRACE_TIME_SOURCE _tx_misra_time_stamp_get()
#endif
#ifndef TX_TRACE_TIME_MASK
@@ -503,6 +513,16 @@ typedef struct
} TX_LINUX_MUTEX;
+/* Define how long a thread waits on the Linux mutex before retrying. A thread
+ parked on the mutex can be suspended by the port's signal handler and so never
+ act on the wake-up the next release sends it, which leaves the wake-up lost
+ and every other waiter parked on a mutex that is free. */
+
+#ifndef TX_LINUX_MUTEX_RETRY_NSEC
+#define TX_LINUX_MUTEX_RETRY_NSEC 1000000
+#endif
+
+
/* Define Linux-specific critical section APIs. */
void _tx_linux_mutex_obtain(TX_LINUX_MUTEX *mutex);
@@ -622,7 +642,7 @@ void _tx_thread_smp_debug_entry_insert(ULONG id, ULONG su
#ifdef TX_THREAD_INIT
CHAR _tx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX SMP/Linux/gcc Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026-present Eclipse ThreadX contributors. * ThreadX SMP/Linux/gcc Version 6.5.2.202603 *";
#else
extern CHAR _tx_version_id[];
#endif