diff options
| author | Bo Chen <[email protected]> | 2021-06-02 06:45:05 +0000 |
|---|---|---|
| committer | Bo Chen <[email protected]> | 2021-06-02 06:45:05 +0000 |
| commit | f5056f4923410b99c87ab909d24ae77bf41923b6 (patch) | |
| tree | b5b5e518b7c36a74a962bfb36f0288c0d1bc0fe7 /common/src/tx_thread_create.c | |
| parent | d759e6bb9e040bc9f973ef706dc7b0a9c68be916 (diff) | |
Release 6.1.7
Diffstat (limited to 'common/src/tx_thread_create.c')
| -rw-r--r-- | common/src/tx_thread_create.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/common/src/tx_thread_create.c b/common/src/tx_thread_create.c index 6af34e3c..78075842 100644 --- a/common/src/tx_thread_create.c +++ b/common/src/tx_thread_create.c @@ -36,7 +36,7 @@ /* FUNCTION RELEASE */ /* */ /* _tx_thread_create PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -84,6 +84,9 @@ /* changed stack calculations */ /* to use ALIGN_TYPE integers, */ /* resulting in version 6.1 */ +/* 06-02-2021 William E. Lamie Modified comment(s), and */ +/* supported TX_MISRA_ENABLE, */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _tx_thread_create(TX_THREAD *thread_ptr, CHAR *name_ptr, VOID (*entry_function)(ULONG id), ULONG entry_input, @@ -120,7 +123,11 @@ ALIGN_TYPE updated_stack_start; stack_size = ((stack_size/(sizeof(ULONG))) * (sizeof(ULONG))) - (sizeof(ULONG)); /* Ensure the starting stack address is evenly aligned. */ +#ifdef TX_MISRA_ENABLE + new_stack_start = TX_POINTER_TO_ULONG_CONVERT(stack_start); +#else new_stack_start = TX_POINTER_TO_ALIGN_TYPE_CONVERT(stack_start); +#endif /* TX_MISRA_ENABLE */ updated_stack_start = ((((ULONG) new_stack_start) + ((sizeof(ULONG)) - ((ULONG) 1)) ) & (~((sizeof(ULONG)) - ((ULONG) 1)))); /* Determine if the starting stack address is different. */ @@ -132,7 +139,11 @@ ALIGN_TYPE updated_stack_start; } /* Update the starting stack pointer. */ +#ifdef TX_MISRA_ENABLE + stack_start = TX_ULONG_TO_POINTER_CONVERT(updated_stack_start); +#else stack_start = TX_ALIGN_TYPE_TO_POINTER_CONVERT(updated_stack_start); +#endif /* TX_MISRA_ENABLE */ #endif /* Prepare the thread control block prior to placing it on the created |
