summaryrefslogtreecommitdiff
path: root/ports/linux/gnu/src/tx_thread_interrupt_control.c
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-03-06 19:27:49 +0100
committerGitHub <[email protected]>2026-03-06 19:27:49 +0100
commit3726d7906b4808bfec7855fc088e073199df9120 (patch)
tree8789bfd03d1d49e1967e80d04aa4ff606fda43eb /ports/linux/gnu/src/tx_thread_interrupt_control.c
parent4b6e8100d932a3a67b34c6eb17f84f3bffb9e2ae (diff)
parentc3259a216026372e3833dd8996a68f77e8595fbd (diff)
Merge pull request #510 from eclipse-threadx/devv6.5.0.202601_rel
Merge changes ahead of the v6.5.0.202601 release
Diffstat (limited to 'ports/linux/gnu/src/tx_thread_interrupt_control.c')
-rw-r--r--ports/linux/gnu/src/tx_thread_interrupt_control.c87
1 files changed, 41 insertions, 46 deletions
diff --git a/ports/linux/gnu/src/tx_thread_interrupt_control.c b/ports/linux/gnu/src/tx_thread_interrupt_control.c
index 657cf72e..75b62511 100644
--- a/ports/linux/gnu/src/tx_thread_interrupt_control.c
+++ b/ports/linux/gnu/src/tx_thread_interrupt_control.c
@@ -1,18 +1,19 @@
/***************************************************************************
- * Copyright (c) 2024 Microsoft Corporation
- *
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026-present Eclipse ThreadX contributors
+ *
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
- *
+ *
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
-/** */
-/** ThreadX Component */
+/** */
+/** ThreadX Component */
/** */
/** Thread */
/** */
@@ -47,53 +48,47 @@ VOID _tx_thread_interrupt_restore(UINT previous_posture)
}
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_interrupt_control Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_interrupt_control Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
-/* This function is responsible for changing the interrupt lockout */
-/* posture of the system. */
-/* */
-/* INPUT */
-/* */
-/* new_posture New interrupt lockout posture */
-/* */
-/* OUTPUT */
-/* */
-/* old_posture Old interrupt lockout posture */
-/* */
-/* CALLS */
-/* */
-/* tx_linux_mutex_lock */
-/* pthread_self */
-/* pthread_getschedparam */
-/* tx_linux_mutex_recursive_unlock */
-/* pthread_exit */
-/* */
-/* CALLED BY */
-/* */
-/* Application Code */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* This function is responsible for changing the interrupt lockout */
+/* posture of the system. */
+/* */
+/* INPUT */
+/* */
+/* new_posture New interrupt lockout posture */
+/* */
+/* OUTPUT */
+/* */
+/* old_posture Old interrupt lockout posture */
+/* */
+/* CALLS */
+/* */
+/* tx_linux_mutex_lock */
+/* pthread_self */
+/* pthread_getschedparam */
+/* tx_linux_mutex_recursive_unlock */
+/* pthread_exit */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
/* */
/**************************************************************************/
UINT _tx_thread_interrupt_control(UINT new_posture)
{
UINT old_posture;
-TX_THREAD *thread_ptr;
+TX_THREAD *thread_ptr;
pthread_t thread_id;
int exit_code = 0;
@@ -107,18 +102,18 @@ int exit_code = 0;
/* Pickup the current thread pointer. */
thread_ptr = _tx_thread_current_ptr;
- /* Determine if this is a thread and it does not
+ /* Determine if this is a thread and it does not
match the current thread pointer. */
- if ((_tx_linux_threadx_thread) &&
- ((!thread_ptr) || (!pthread_equal(thread_ptr -> tx_thread_linux_thread_id, thread_id))))
- {
+ if ((_tx_linux_threadx_thread) &&
+ ((!thread_ptr) || (!pthread_equal(thread_ptr -> tx_thread_linux_thread_id, thread_id))))
+ {
- /* This indicates the Linux thread was actually terminated by ThreadX is only
+ /* This indicates the Linux thread was actually terminated by ThreadX is only
being allowed to run in order to cleanup its resources. */
/* Unlock linux mutex. */
tx_linux_mutex_recursive_unlock(_tx_linux_mutex);
pthread_exit((void *)&exit_code);
- }
+ }
/* Determine the current interrupt lockout condition. */
if (tx_linux_mutex_recursive_count == 1)
@@ -155,7 +150,7 @@ int exit_code = 0;
_tx_linux_global_int_disabled_flag = TX_TRUE;
}
}
- else if (thread_ptr)
+ else if (thread_ptr)
{
/* Determine how to apply the new posture. */