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_SYSTEM_SUSPEND_CALL_NOT_USED
26 /**************************************************************************/
27 /* */
28 /* FUNCTION RELEASE */
29 /* */
30 /* _tx_thread_system_suspend PORTABLE C */
31 /* 6.1.10 */
32 /* */
33 /* AUTHOR */
34 /* */
35 /* Scott Larson, Microsoft Corporation */
36 /* */
37 /* DESCRIPTION */
38 /* */
39 /* This function suspends the specified thread and changes the thread */
40 /* state to the value specified. Note: delayed suspension processing */
41 /* is handled outside of this routine. */
42 /* */
43 /* INPUT */
44 /* */
45 /* thread_ptr Pointer to thread to suspend */
46 /* */
47 /* OUTPUT */
48 /* */
49 /* None */
50 /* */
51 /* CALLS */
52 /* */
53 /* _txm_module_kernel_call_dispatcher */
54 /* */
55 /* CALLED BY */
56 /* */
57 /* _tx_thread_priority_change Thread priority change */
58 /* _tx_thread_shell_entry Thread shell function */
59 /* _tx_thread_sleep Thread sleep */
60 /* _tx_thread_suspend Application thread suspend */
61 /* _tx_thread_terminate Thread terminate */
62 /* Other ThreadX Components */
63 /* */
64 /* RELEASE HISTORY */
65 /* */
66 /* DATE NAME DESCRIPTION */
67 /* */
68 /* 09-30-2020 Scott Larson Initial Version 6.1 */
69 /* 01-31-2022 Scott Larson Modified comments and added */
70 /* CALL_NOT_USED option, */
71 /* resulting in version 6.1.10 */
72 /* */
73 /**************************************************************************/
_txm_module_thread_system_suspend(TX_THREAD * thread_ptr)74 UINT _txm_module_thread_system_suspend(TX_THREAD *thread_ptr)
75 {
76
77 UINT return_value;
78
79 /* Call module manager dispatcher. */
80 return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_SYSTEM_SUSPEND_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
81
82 /* Return value to the caller. */
83 return(return_value);
84 }
85 #endif
86