1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** ThreadX Component */
17 /** */
18 /** Module */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define TXM_MODULE
24 #include "txm_module.h"
25 #ifndef TXM_THREAD_RESET_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _txe_thread_reset PORTABLE C */
31 /* 6.1.10 */
32 /* AUTHOR */
33 /* */
34 /* Scott Larson, Microsoft Corporation */
35 /* */
36 /* DESCRIPTION */
37 /* */
38 /* This function checks for errors in the thread reset function call. */
39 /* */
40 /* INPUT */
41 /* */
42 /* thread_ptr Pointer to thread to reset */
43 /* */
44 /* OUTPUT */
45 /* */
46 /* TX_THREAD_ERROR Invalid thread pointer */
47 /* TX_CALLER_ERROR Invalid caller of function */
48 /* status Service return status */
49 /* */
50 /* CALLS */
51 /* */
52 /* _txm_module_kernel_call_dispatcher */
53 /* */
54 /* CALLED BY */
55 /* */
56 /* Module application code */
57 /* */
58 /* RELEASE HISTORY */
59 /* */
60 /* DATE NAME DESCRIPTION */
61 /* */
62 /* 09-30-2020 Scott Larson Initial Version 6.1 */
63 /* 01-31-2022 Scott Larson Modified comments and added */
64 /* CALL_NOT_USED option, */
65 /* resulting in version 6.1.10 */
66 /* */
67 /**************************************************************************/
_txe_thread_reset(TX_THREAD * thread_ptr)68 UINT _txe_thread_reset(TX_THREAD *thread_ptr)
69 {
70
71 UINT return_value;
72
73 /* Call module manager dispatcher. */
74 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_RESET_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
75
76 /* Return value to the caller. */
77 return(return_value);
78 }
79 #endif
80