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