summaryrefslogtreecommitdiff
path: root/ports/xtensa/xcc/inc/tx_api_asm.h
blob: 8eed6752205abd364845d66f6f73c0c36d752c6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

/***************************************************************************
 * Copyright (c) 2024 Microsoft Corporation
 *
 * This program and the accompanying materials are made available under the
 * terms of the MIT License which is available at
 * https://opensource.org/licenses/MIT.
 *
 * SPDX-License-Identifier: MIT
 **************************************************************************/

/**************************************************************************/
/*                                                                        */
/*  DESCRIPTION                                                           */
/*                                                                        */
/*    This file contains macro constants for ThreadX API structures       */
/*    and enums that need to be used in assembly coded port sources.      */
/*    Most of these constants are derived from definitions in tx_api.h.   */
/*    Only the constants that are needed are included here to reduce      */
/*    the maintenance required when the structures or enums change.       */
/*    Structure offsets depend on the compiler, so are tools-specific,    */
/*    which usually means port-specific since a compiler's struct         */
/*    packing rules depend on properties of the target architecture.      */
/*                                                                        */
/**************************************************************************/

#ifndef TX_API_ASM_H
#define TX_API_ASM_H

#include "tx_port.h"

/* API input parameters and general constants.  */

#define TX_TRUE                         1
#define TX_FALSE                        0
#define TX_NULL                         0

/* ThreadX thread control block structure.  */
//  typedef struct TX_THREAD_STRUCT
//  {

#define tx_thread_run_count             0x04
#define tx_thread_stack_ptr             0x08
#define tx_thread_stack_end             0x10
#define tx_thread_time_slice            0x18
#define tx_thread_new_time_slice        0x1C
#define tx_thread_solicited             0x28

#ifdef TX_THREAD_SAFE_CLIB
  #define tx_real_thread_entry          0x2C
  #define tx_thread_clib_ptr            0x30
  #define tx_thread_cp_state            0x34
#else
  #define tx_thread_cp_state            0x2C
#endif

//  }

#endif /* TX_API_ASM_H */