1 
2 /***************************************************************************
3  * Copyright (c) 2024 Microsoft Corporation
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the MIT License which is available at
7  * https://opensource.org/licenses/MIT.
8  *
9  * SPDX-License-Identifier: MIT
10  **************************************************************************/
11 
12 /**************************************************************************/
13 /*                                                                        */
14 /*  DESCRIPTION                                                           */
15 /*                                                                        */
16 /*    This file contains macro constants for ThreadX API structures       */
17 /*    and enums that need to be used in assembly coded port sources.      */
18 /*    Most of these constants are derived from definitions in tx_api.h.   */
19 /*    Only the constants that are needed are included here to reduce      */
20 /*    the maintenance required when the structures or enums change.       */
21 /*    Structure offsets depend on the compiler, so are tools-specific,    */
22 /*    which usually means port-specific since a compiler's struct         */
23 /*    packing rules depend on properties of the target architecture.      */
24 /*                                                                        */
25 /*  RELEASE HISTORY                                                       */
26 /*                                                                        */
27 /*    DATE              NAME                      DESCRIPTION             */
28 /*                                                                        */
29 /*  12-31-2020     Cadence Design Systems   Initial Version 6.1.3         */
30 /*                                                                        */
31 /**************************************************************************/
32 
33 #ifndef TX_API_ASM_H
34 #define TX_API_ASM_H
35 
36 #include "tx_port.h"
37 
38 /* API input parameters and general constants.  */
39 
40 #define TX_TRUE                         1
41 #define TX_FALSE                        0
42 #define TX_NULL                         0
43 
44 /* ThreadX thread control block structure.  */
45 //  typedef struct TX_THREAD_STRUCT
46 //  {
47 
48 #define tx_thread_run_count             0x04
49 #define tx_thread_stack_ptr             0x08
50 #define tx_thread_stack_end             0x10
51 #define tx_thread_time_slice            0x18
52 #define tx_thread_new_time_slice        0x1C
53 #define tx_thread_solicited             0x28
54 
55 #ifdef TX_THREAD_SAFE_CLIB
56   #define tx_real_thread_entry          0x2C
57   #define tx_thread_clib_ptr            0x30
58   #define tx_thread_cp_state            0x34
59 #else
60   #define tx_thread_cp_state            0x2C
61 #endif
62 
63 //  }
64 
65 #endif /* TX_API_ASM_H */
66 
67