1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** ThreadX Component                                                     */
16 /**                                                                       */
17 /**   Module                                                              */
18 /**                                                                       */
19 /**************************************************************************/
20 /**************************************************************************/
21 
22 #define TXM_MODULE
23 #include "txm_module.h"
24 #ifndef TXM_THREAD_WAIT_ABORT_CALL_NOT_USED
25 /**************************************************************************/
26 /*                                                                        */
27 /*  FUNCTION                                               RELEASE        */
28 /*                                                                        */
29 /*    _txe_thread_wait_abort                              PORTABLE C      */
30 /*                                                           6.1.10       */
31 /*  AUTHOR                                                                */
32 /*                                                                        */
33 /*    Scott Larson, Microsoft Corporation                                 */
34 /*                                                                        */
35 /*  DESCRIPTION                                                           */
36 /*                                                                        */
37 /*    This function checks for errors in the thread wait abort function   */
38 /*    call.                                                               */
39 /*                                                                        */
40 /*  INPUT                                                                 */
41 /*                                                                        */
42 /*    thread_ptr                            Thread to abort the wait on   */
43 /*                                                                        */
44 /*  OUTPUT                                                                */
45 /*                                                                        */
46 /*    status                                Return completion status      */
47 /*                                                                        */
48 /*  CALLS                                                                 */
49 /*                                                                        */
50 /*    _txm_module_kernel_call_dispatcher                                  */
51 /*                                                                        */
52 /*  CALLED BY                                                             */
53 /*                                                                        */
54 /*    Module application code                                             */
55 /*                                                                        */
56 /*  RELEASE HISTORY                                                       */
57 /*                                                                        */
58 /*    DATE              NAME                      DESCRIPTION             */
59 /*                                                                        */
60 /*  09-30-2020      Scott Larson            Initial Version 6.1           */
61 /*  01-31-2022      Scott Larson            Modified comments and added   */
62 /*                                            CALL_NOT_USED option,       */
63 /*                                            resulting in version 6.1.10 */
64 /*                                                                        */
65 /**************************************************************************/
_txe_thread_wait_abort(TX_THREAD * thread_ptr)66 UINT _txe_thread_wait_abort(TX_THREAD *thread_ptr)
67 {
68 
69 UINT return_value;
70 
71     /* Call module manager dispatcher.  */
72     return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_THREAD_WAIT_ABORT_CALL, (ALIGN_TYPE) thread_ptr, 0, 0);
73 
74     /* Return value to the caller.  */
75     return(return_value);
76 }
77 #endif
78