summaryrefslogtreecommitdiff
path: root/ports/linux/gnu/src/tx_thread_stack_build.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/linux/gnu/src/tx_thread_stack_build.c')
-rw-r--r--ports/linux/gnu/src/tx_thread_stack_build.c73
1 files changed, 34 insertions, 39 deletions
diff --git a/ports/linux/gnu/src/tx_thread_stack_build.c b/ports/linux/gnu/src/tx_thread_stack_build.c
index 424f53e2..cdadba6c 100644
--- a/ports/linux/gnu/src/tx_thread_stack_build.c
+++ b/ports/linux/gnu/src/tx_thread_stack_build.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 */
/** */
@@ -36,50 +37,44 @@
void *_tx_linux_thread_entry(void *ptr);
-/**************************************************************************/
-/* */
-/* FUNCTION RELEASE */
-/* */
-/* _tx_thread_stack_build Linux/GNU */
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _tx_thread_stack_build Linux/GNU */
/* 6.1 */
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
-/* */
+/* */
/* This function builds a stack frame on the supplied thread's stack. */
/* The stack frame results in a fake interrupt return to the supplied */
-/* function pointer. */
-/* */
-/* INPUT */
-/* */
+/* function pointer. */
+/* */
+/* INPUT */
+/* */
/* thread_ptr Pointer to thread control blk */
/* function_ptr Pointer to return function */
-/* */
-/* OUTPUT */
-/* */
+/* */
+/* OUTPUT */
+/* */
/* None */
-/* */
-/* CALLS */
-/* */
-/* pthread_create */
-/* pthread_setschedparam */
-/* _tx_linux_thread_suspend */
-/* sem_init */
-/* printf */
-/* _tx_linux_thread_resume */
-/* */
-/* CALLED BY */
-/* */
-/* _tx_thread_create Create thread service */
-/* _tx_thread_reset Reset thread service */
-/* */
-/* RELEASE HISTORY */
-/* */
-/* DATE NAME DESCRIPTION */
/* */
-/* 09-30-2020 William E. Lamie Initial Version 6.1 */
+/* CALLS */
+/* */
+/* pthread_create */
+/* pthread_setschedparam */
+/* _tx_linux_thread_suspend */
+/* sem_init */
+/* printf */
+/* _tx_linux_thread_resume */
+/* */
+/* CALLED BY */
+/* */
+/* _tx_thread_create Create thread service */
+/* _tx_thread_reset Reset thread service */
/* */
/**************************************************************************/
VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
@@ -115,11 +110,11 @@ struct sched_param sp;
sp.sched_priority = TX_LINUX_PRIORITY_USER_THREAD;
pthread_setschedparam(thread_ptr -> tx_thread_linux_thread_id, SCHED_FIFO, &sp);
- /* Setup the thread suspension type to solicited thread suspension.
+ /* Setup the thread suspension type to solicited thread suspension.
Pseudo interrupt handlers will suspend with this field set to 1. */
thread_ptr -> tx_thread_linux_suspension_type = 0;
- /* Clear the disabled count that will keep track of the
+ /* Clear the disabled count that will keep track of the
tx_interrupt_control nesting. */
thread_ptr -> tx_thread_linux_int_disabled_flag = 0;