tx_initialize.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. /** ThreadX Component */
  14. /** */
  15. /** Initialize */
  16. /** */
  17. /**************************************************************************/
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /* */
  21. /* COMPONENT DEFINITION RELEASE */
  22. /* */
  23. /* tx_initialize.h PORTABLE C */
  24. /* 6.1 */
  25. /* AUTHOR */
  26. /* */
  27. /* William E. Lamie, Microsoft Corporation */
  28. /* */
  29. /* DESCRIPTION */
  30. /* */
  31. /* This file defines the ThreadX initialization component, including */
  32. /* data types and external references. It is assumed that tx_api.h */
  33. /* and tx_port.h have already been included. */
  34. /* */
  35. /* RELEASE HISTORY */
  36. /* */
  37. /* DATE NAME DESCRIPTION */
  38. /* */
  39. /* 05-19-2020 William E. Lamie Initial Version 6.0 */
  40. /* 09-30-2020 Yuxin Zhou Modified comment(s), */
  41. /* resulting in version 6.1 */
  42. /* */
  43. /**************************************************************************/
  44. #ifndef TX_INITIALIZE_H
  45. #define TX_INITIALIZE_H
  46. /* Define constants that indicate initialization is in progress. */
  47. #define TX_INITIALIZE_IN_PROGRESS ((ULONG) 0xF0F0F0F0UL)
  48. #define TX_INITIALIZE_ALMOST_DONE ((ULONG) 0xF0F0F0F1UL)
  49. #define TX_INITIALIZE_IS_FINISHED ((ULONG) 0x00000000UL)
  50. /* Define internal initialization function prototypes. */
  51. VOID _tx_initialize_high_level(VOID);
  52. VOID _tx_initialize_kernel_setup(VOID);
  53. VOID _tx_initialize_low_level(VOID);
  54. /* Define the macro for adding additional port-specific global data. This macro is defined
  55. as white space, unless defined by tx_port.h. */
  56. #ifndef TX_PORT_SPECIFIC_DATA
  57. #define TX_PORT_SPECIFIC_DATA
  58. #endif
  59. /* Define the macro for adding additional port-specific pre and post initialization processing.
  60. These macros is defined as white space, unless defined by tx_port.h. */
  61. #ifndef TX_PORT_SPECIFIC_PRE_INITIALIZATION
  62. #define TX_PORT_SPECIFIC_PRE_INITIALIZATION
  63. #endif
  64. #ifndef TX_PORT_SPECIFIC_POST_INITIALIZATION
  65. #define TX_PORT_SPECIFIC_POST_INITIALIZATION
  66. #endif
  67. #ifndef TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION
  68. #define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION
  69. #endif
  70. /* Initialization component data declarations follow. */
  71. /* Determine if the initialization function of this component is including
  72. this file. If so, make the data definitions really happen. Otherwise,
  73. make them extern so other functions in the component can access them. */
  74. #ifdef TX_INITIALIZE_INIT
  75. #define INITIALIZE_DECLARE
  76. #else
  77. #define INITIALIZE_DECLARE extern
  78. #endif
  79. /* Define the unused memory pointer. The value of the first available
  80. memory address is placed in this variable in the low-level
  81. initialization function. The content of this variable is passed
  82. to the application's system definition function. */
  83. INITIALIZE_DECLARE VOID *_tx_initialize_unused_memory;
  84. #endif