mirror of
https://github.com/eclipse-threadx/threadx.git
synced 2025-11-16 04:24:48 +00:00
add SMP, Modules, and more processor/tools releases
This commit is contained in:
2212
common_smp/inc/tx_api.h
Normal file
2212
common_smp/inc/tx_api.h
Normal file
File diff suppressed because it is too large
Load Diff
146
common_smp/inc/tx_block_pool.h
Normal file
146
common_smp/inc/tx_block_pool.h
Normal file
@@ -0,0 +1,146 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Block Memory */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_block_pool.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX block memory management component, */
|
||||
/* including all data types and external references. It is assumed */
|
||||
/* that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_BLOCK_POOL_H
|
||||
#define TX_BLOCK_POOL_H
|
||||
|
||||
|
||||
/* Define block memory control specific data definitions. */
|
||||
|
||||
#define TX_BLOCK_POOL_ID ((ULONG) 0x424C4F43)
|
||||
|
||||
|
||||
/* Determine if in-line component initialization is supported by the
|
||||
caller. */
|
||||
|
||||
#ifdef TX_INVOKE_INLINE_INITIALIZATION
|
||||
|
||||
/* Yes, in-line initialization is supported, remap the block memory pool
|
||||
initialization function. */
|
||||
|
||||
#ifndef TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO
|
||||
#define _tx_block_pool_initialize() \
|
||||
_tx_block_pool_created_ptr = TX_NULL; \
|
||||
_tx_block_pool_created_count = TX_EMPTY
|
||||
#else
|
||||
#define _tx_block_pool_initialize() \
|
||||
_tx_block_pool_created_ptr = TX_NULL; \
|
||||
_tx_block_pool_created_count = TX_EMPTY; \
|
||||
_tx_block_pool_performance_allocate_count = ((ULONG) 0); \
|
||||
_tx_block_pool_performance_release_count = ((ULONG) 0); \
|
||||
_tx_block_pool_performance_suspension_count = ((ULONG) 0); \
|
||||
_tx_block_pool_performance_timeout_count = ((ULONG) 0)
|
||||
#endif
|
||||
#define TX_BLOCK_POOL_INIT
|
||||
#else
|
||||
|
||||
/* No in-line initialization is supported, use standard function call. */
|
||||
VOID _tx_block_pool_initialize(VOID);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define internal block memory pool management function prototypes. */
|
||||
|
||||
VOID _tx_block_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
|
||||
|
||||
|
||||
/* Block pool management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_BLOCK_POOL_INIT
|
||||
#define BLOCK_POOL_DECLARE
|
||||
#else
|
||||
#define BLOCK_POOL_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the head pointer of the created block pool list. */
|
||||
|
||||
BLOCK_POOL_DECLARE TX_BLOCK_POOL * _tx_block_pool_created_ptr;
|
||||
|
||||
|
||||
/* Define the variable that holds the number of created block pools. */
|
||||
|
||||
BLOCK_POOL_DECLARE ULONG _tx_block_pool_created_count;
|
||||
|
||||
|
||||
#ifdef TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of block allocates. */
|
||||
|
||||
BLOCK_POOL_DECLARE ULONG _tx_block_pool_performance_allocate_count;
|
||||
|
||||
|
||||
/* Define the total number of block releases. */
|
||||
|
||||
BLOCK_POOL_DECLARE ULONG _tx_block_pool_performance_release_count;
|
||||
|
||||
|
||||
/* Define the total number of block pool suspensions. */
|
||||
|
||||
BLOCK_POOL_DECLARE ULONG _tx_block_pool_performance_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of block pool timeouts. */
|
||||
|
||||
BLOCK_POOL_DECLARE ULONG _tx_block_pool_performance_timeout_count;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Define default post block pool delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_BLOCK_POOL_DELETE_PORT_COMPLETION
|
||||
#define TX_BLOCK_POOL_DELETE_PORT_COMPLETION(p)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
177
common_smp/inc/tx_byte_pool.h
Normal file
177
common_smp/inc/tx_byte_pool.h
Normal file
@@ -0,0 +1,177 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Byte Memory */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_byte_pool.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX byte memory management component, */
|
||||
/* including all data types and external references. It is assumed */
|
||||
/* that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_BYTE_POOL_H
|
||||
#define TX_BYTE_POOL_H
|
||||
|
||||
|
||||
/* Define byte memory control specific data definitions. */
|
||||
|
||||
#define TX_BYTE_POOL_ID ((ULONG) 0x42595445)
|
||||
|
||||
#ifndef TX_BYTE_BLOCK_FREE
|
||||
#define TX_BYTE_BLOCK_FREE ((ULONG) 0xFFFFEEEEUL)
|
||||
#endif
|
||||
|
||||
#ifndef TX_BYTE_BLOCK_MIN
|
||||
#define TX_BYTE_BLOCK_MIN ((ULONG) 20)
|
||||
#endif
|
||||
|
||||
#ifndef TX_BYTE_POOL_MIN
|
||||
#define TX_BYTE_POOL_MIN ((ULONG) 100)
|
||||
#endif
|
||||
|
||||
|
||||
/* Determine if in-line component initialization is supported by the
|
||||
caller. */
|
||||
|
||||
#ifdef TX_INVOKE_INLINE_INITIALIZATION
|
||||
|
||||
/* Yes, in-line initialization is supported, remap the byte memory pool
|
||||
initialization function. */
|
||||
|
||||
#ifndef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO
|
||||
#define _tx_byte_pool_initialize() \
|
||||
_tx_byte_pool_created_ptr = TX_NULL; \
|
||||
_tx_byte_pool_created_count = TX_EMPTY
|
||||
#else
|
||||
#define _tx_byte_pool_initialize() \
|
||||
_tx_byte_pool_created_ptr = TX_NULL; \
|
||||
_tx_byte_pool_created_count = TX_EMPTY; \
|
||||
_tx_byte_pool_performance_allocate_count = ((ULONG) 0); \
|
||||
_tx_byte_pool_performance_release_count = ((ULONG) 0); \
|
||||
_tx_byte_pool_performance_merge_count = ((ULONG) 0); \
|
||||
_tx_byte_pool_performance_split_count = ((ULONG) 0); \
|
||||
_tx_byte_pool_performance_search_count = ((ULONG) 0); \
|
||||
_tx_byte_pool_performance_suspension_count = ((ULONG) 0); \
|
||||
_tx_byte_pool_performance_timeout_count = ((ULONG) 0)
|
||||
#endif
|
||||
#define TX_BYTE_POOL_INIT
|
||||
#else
|
||||
|
||||
/* No in-line initialization is supported, use standard function call. */
|
||||
VOID _tx_byte_pool_initialize(VOID);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define internal byte memory pool management function prototypes. */
|
||||
|
||||
UCHAR *_tx_byte_pool_search(TX_BYTE_POOL *pool_ptr, ULONG memory_size);
|
||||
VOID _tx_byte_pool_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
|
||||
|
||||
|
||||
/* Byte pool management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_BYTE_POOL_INIT
|
||||
#define BYTE_POOL_DECLARE
|
||||
#else
|
||||
#define BYTE_POOL_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the head pointer of the created byte pool list. */
|
||||
|
||||
BYTE_POOL_DECLARE TX_BYTE_POOL * _tx_byte_pool_created_ptr;
|
||||
|
||||
|
||||
/* Define the variable that holds the number of created byte pools. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_created_count;
|
||||
|
||||
|
||||
#ifdef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of allocates. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_allocate_count;
|
||||
|
||||
|
||||
/* Define the total number of releases. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_release_count;
|
||||
|
||||
|
||||
/* Define the total number of adjacent memory fragment merges. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_merge_count;
|
||||
|
||||
|
||||
/* Define the total number of memory fragment splits. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_split_count;
|
||||
|
||||
|
||||
/* Define the total number of memory fragments searched during allocation. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_search_count;
|
||||
|
||||
|
||||
/* Define the total number of byte pool suspensions. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of byte pool timeouts. */
|
||||
|
||||
BYTE_POOL_DECLARE ULONG _tx_byte_pool_performance_timeout_count;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Define default post byte pool delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_BYTE_POOL_DELETE_PORT_COMPLETION
|
||||
#define TX_BYTE_POOL_DELETE_PORT_COMPLETION(p)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
147
common_smp/inc/tx_event_flags.h
Normal file
147
common_smp/inc/tx_event_flags.h
Normal file
@@ -0,0 +1,147 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Event Flags */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_event_flags.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX event flags management component, */
|
||||
/* including all data types and external references. It is assumed */
|
||||
/* that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_EVENT_FLAGS_H
|
||||
#define TX_EVENT_FLAGS_H
|
||||
|
||||
|
||||
/* Define event flags control specific data definitions. */
|
||||
|
||||
#define TX_EVENT_FLAGS_ID ((ULONG) 0x4456444E)
|
||||
#define TX_EVENT_FLAGS_AND_MASK ((UINT) 0x2)
|
||||
#define TX_EVENT_FLAGS_CLEAR_MASK ((UINT) 0x1)
|
||||
|
||||
|
||||
/* Determine if in-line component initialization is supported by the
|
||||
caller. */
|
||||
#ifdef TX_INVOKE_INLINE_INITIALIZATION
|
||||
|
||||
/* Yes, in-line initialization is supported, remap the event flag initialization
|
||||
function. */
|
||||
|
||||
#ifndef TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO
|
||||
#define _tx_event_flags_initialize() \
|
||||
_tx_event_flags_created_ptr = TX_NULL; \
|
||||
_tx_event_flags_created_count = TX_EMPTY
|
||||
#else
|
||||
#define _tx_event_flags_initialize() \
|
||||
_tx_event_flags_created_ptr = TX_NULL; \
|
||||
_tx_event_flags_created_count = TX_EMPTY; \
|
||||
_tx_event_flags_performance_set_count = ((ULONG) 0); \
|
||||
_tx_event_flags_performance_get_count = ((ULONG) 0); \
|
||||
_tx_event_flags_performance_suspension_count = ((ULONG) 0); \
|
||||
_tx_event_flags_performance_timeout_count = ((ULONG) 0)
|
||||
#endif
|
||||
#define TX_EVENT_FLAGS_INIT
|
||||
#else
|
||||
|
||||
/* No in-line initialization is supported, use standard function call. */
|
||||
VOID _tx_event_flags_initialize(VOID);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define internal event flags management function prototypes. */
|
||||
|
||||
VOID _tx_event_flags_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
|
||||
|
||||
|
||||
/* Event flags management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_EVENT_FLAGS_INIT
|
||||
#define EVENT_FLAGS_DECLARE
|
||||
#else
|
||||
#define EVENT_FLAGS_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the head pointer of the created event flags list. */
|
||||
|
||||
EVENT_FLAGS_DECLARE TX_EVENT_FLAGS_GROUP * _tx_event_flags_created_ptr;
|
||||
|
||||
|
||||
/* Define the variable that holds the number of created event flag groups. */
|
||||
|
||||
EVENT_FLAGS_DECLARE ULONG _tx_event_flags_created_count;
|
||||
|
||||
|
||||
#ifdef TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of event flag sets. */
|
||||
|
||||
EVENT_FLAGS_DECLARE ULONG _tx_event_flags_performance_set_count;
|
||||
|
||||
|
||||
/* Define the total number of event flag gets. */
|
||||
|
||||
EVENT_FLAGS_DECLARE ULONG _tx_event_flags_performance_get_count;
|
||||
|
||||
|
||||
/* Define the total number of event flag suspensions. */
|
||||
|
||||
EVENT_FLAGS_DECLARE ULONG _tx_event_flags_performance_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of event flag timeouts. */
|
||||
|
||||
EVENT_FLAGS_DECLARE ULONG _tx_event_flags_performance_timeout_count;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* Define default post event flag group delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_EVENT_FLAGS_GROUP_DELETE_PORT_COMPLETION
|
||||
#define TX_EVENT_FLAGS_GROUP_DELETE_PORT_COMPLETION(g)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
111
common_smp/inc/tx_initialize.h
Normal file
111
common_smp/inc/tx_initialize.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Initialize */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_initialize.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX initialization component, including */
|
||||
/* data types and external references. It is assumed that tx_api.h */
|
||||
/* and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_INITIALIZE_H
|
||||
#define TX_INITIALIZE_H
|
||||
|
||||
|
||||
/* Define constants that indicate initialization is in progress. */
|
||||
|
||||
#define TX_INITIALIZE_IN_PROGRESS ((ULONG) 0xF0F0F0F0UL)
|
||||
#define TX_INITIALIZE_ALMOST_DONE ((ULONG) 0xF0F0F0F1UL)
|
||||
#define TX_INITIALIZE_IS_FINISHED ((ULONG) 0x00000000UL)
|
||||
|
||||
|
||||
/* Define internal initialization function prototypes. */
|
||||
|
||||
VOID _tx_initialize_high_level(VOID);
|
||||
VOID _tx_initialize_kernel_setup(VOID);
|
||||
VOID _tx_initialize_low_level(VOID);
|
||||
|
||||
|
||||
/* Define the macro for adding additional port-specific global data. This macro is defined
|
||||
as white space, unless defined by tx_port.h. */
|
||||
|
||||
#ifndef TX_PORT_SPECIFIC_DATA
|
||||
#define TX_PORT_SPECIFIC_DATA
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the macro for adding additional port-specific pre and post initialization processing.
|
||||
These macros is defined as white space, unless defined by tx_port.h. */
|
||||
|
||||
#ifndef TX_PORT_SPECIFIC_PRE_INITIALIZATION
|
||||
#define TX_PORT_SPECIFIC_PRE_INITIALIZATION
|
||||
#endif
|
||||
|
||||
#ifndef TX_PORT_SPECIFIC_POST_INITIALIZATION
|
||||
#define TX_PORT_SPECIFIC_POST_INITIALIZATION
|
||||
#endif
|
||||
|
||||
#ifndef TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION
|
||||
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION
|
||||
#endif
|
||||
|
||||
|
||||
/* Initialization component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_INITIALIZE_INIT
|
||||
#define INITIALIZE_DECLARE
|
||||
#else
|
||||
#define INITIALIZE_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the unused memory pointer. The value of the first available
|
||||
memory address is placed in this variable in the low-level
|
||||
initialization function. The content of this variable is passed
|
||||
to the application's system definition function. */
|
||||
|
||||
INITIALIZE_DECLARE VOID *_tx_initialize_unused_memory;
|
||||
|
||||
|
||||
#endif
|
||||
160
common_smp/inc/tx_mutex.h
Normal file
160
common_smp/inc/tx_mutex.h
Normal file
@@ -0,0 +1,160 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Mutex */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_mutex.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX mutex management component, */
|
||||
/* including all data types and external references. It is assumed */
|
||||
/* that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_MUTEX_H
|
||||
#define TX_MUTEX_H
|
||||
|
||||
|
||||
/* Define mutex control specific data definitions. */
|
||||
|
||||
#define TX_MUTEX_ID ((ULONG) 0x4D555445)
|
||||
|
||||
|
||||
/* Determine if in-line component initialization is supported by the
|
||||
caller. */
|
||||
|
||||
#ifdef TX_INVOKE_INLINE_INITIALIZATION
|
||||
|
||||
/* Yes, in-line initialization is supported, remap the mutex initialization
|
||||
function. */
|
||||
|
||||
#ifndef TX_MUTEX_ENABLE_PERFORMANCE_INFO
|
||||
#define _tx_mutex_initialize() \
|
||||
_tx_mutex_created_ptr = TX_NULL; \
|
||||
_tx_mutex_created_count = TX_EMPTY
|
||||
#else
|
||||
#define _tx_mutex_initialize() \
|
||||
_tx_mutex_created_ptr = TX_NULL; \
|
||||
_tx_mutex_created_count = TX_EMPTY; \
|
||||
_tx_mutex_performance_put_count = ((ULONG) 0); \
|
||||
_tx_mutex_performance_get_count = ((ULONG) 0); \
|
||||
_tx_mutex_performance_suspension_count = ((ULONG) 0); \
|
||||
_tx_mutex_performance_timeout_count = ((ULONG) 0); \
|
||||
_tx_mutex_performance_priority_inversion_count = ((ULONG) 0); \
|
||||
_tx_mutex_performance__priority_inheritance_count = ((ULONG) 0)
|
||||
#endif
|
||||
#define TX_MUTEX_INIT
|
||||
#else
|
||||
|
||||
/* No in-line initialization is supported, use standard function call. */
|
||||
VOID _tx_mutex_initialize(VOID);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define internal mutex management function prototypes. */
|
||||
|
||||
VOID _tx_mutex_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
|
||||
VOID _tx_mutex_thread_release(TX_THREAD *thread_ptr);
|
||||
VOID _tx_mutex_priority_change(TX_THREAD *thread_ptr, UINT new_priority);
|
||||
|
||||
|
||||
/* Mutex management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_MUTEX_INIT
|
||||
#define MUTEX_DECLARE
|
||||
#else
|
||||
#define MUTEX_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the head pointer of the created mutex list. */
|
||||
|
||||
MUTEX_DECLARE TX_MUTEX * _tx_mutex_created_ptr;
|
||||
|
||||
|
||||
/* Define the variable that holds the number of created mutexes. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_created_count;
|
||||
|
||||
|
||||
#ifdef TX_MUTEX_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of mutex puts. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_performance_put_count;
|
||||
|
||||
|
||||
/* Define the total number of mutex gets. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_performance_get_count;
|
||||
|
||||
|
||||
/* Define the total number of mutex suspensions. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_performance_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of mutex timeouts. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_performance_timeout_count;
|
||||
|
||||
|
||||
/* Define the total number of priority inversions. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_performance_priority_inversion_count;
|
||||
|
||||
|
||||
/* Define the total number of priority inheritance conditions. */
|
||||
|
||||
MUTEX_DECLARE ULONG _tx_mutex_performance__priority_inheritance_count;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Define default post mutex delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_MUTEX_DELETE_PORT_COMPLETION
|
||||
#define TX_MUTEX_DELETE_PORT_COMPLETION(m)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
173
common_smp/inc/tx_queue.h
Normal file
173
common_smp/inc/tx_queue.h
Normal file
@@ -0,0 +1,173 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Queue */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_queue.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX queue management component, */
|
||||
/* including all data types and external references. It is assumed */
|
||||
/* that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_QUEUE_H
|
||||
#define TX_QUEUE_H
|
||||
|
||||
|
||||
/* Define queue control specific data definitions. */
|
||||
|
||||
#define TX_QUEUE_ID ((ULONG) 0x51554555)
|
||||
|
||||
|
||||
/* Determine if in-line component initialization is supported by the
|
||||
caller. */
|
||||
#ifdef TX_INVOKE_INLINE_INITIALIZATION
|
||||
|
||||
/* Yes, in-line initialization is supported, remap the queue initialization
|
||||
function. */
|
||||
|
||||
#ifndef TX_QUEUE_ENABLE_PERFORMANCE_INFO
|
||||
#define _tx_queue_initialize() \
|
||||
_tx_queue_created_ptr = TX_NULL; \
|
||||
_tx_queue_created_count = TX_EMPTY
|
||||
#else
|
||||
#define _tx_queue_initialize() \
|
||||
_tx_queue_created_ptr = TX_NULL; \
|
||||
_tx_queue_created_count = TX_EMPTY; \
|
||||
_tx_queue_performance_messages_sent_count = ((ULONG) 0); \
|
||||
_tx_queue_performance__messages_received_count = ((ULONG) 0); \
|
||||
_tx_queue_performance_empty_suspension_count = ((ULONG) 0); \
|
||||
_tx_queue_performance_full_suspension_count = ((ULONG) 0); \
|
||||
_tx_queue_performance_timeout_count = ((ULONG) 0)
|
||||
#endif
|
||||
#define TX_QUEUE_INIT
|
||||
#else
|
||||
|
||||
/* No in-line initialization is supported, use standard function call. */
|
||||
VOID _tx_queue_initialize(VOID);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the message copy macro. Note that the source and destination
|
||||
pointers must be modified since they are used subsequently. */
|
||||
|
||||
#ifndef TX_QUEUE_MESSAGE_COPY
|
||||
#define TX_QUEUE_MESSAGE_COPY(s, d, z) \
|
||||
*(d)++ = *(s)++; \
|
||||
if ((z) > ((UINT) 1)) \
|
||||
{ \
|
||||
while (--(z)) \
|
||||
{ \
|
||||
*(d)++ = *(s)++; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Define internal queue management function prototypes. */
|
||||
|
||||
VOID _tx_queue_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
|
||||
|
||||
|
||||
/* Queue management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_QUEUE_INIT
|
||||
#define QUEUE_DECLARE
|
||||
#else
|
||||
#define QUEUE_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the head pointer of the created queue list. */
|
||||
|
||||
QUEUE_DECLARE TX_QUEUE * _tx_queue_created_ptr;
|
||||
|
||||
|
||||
/* Define the variable that holds the number of created queues. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_created_count;
|
||||
|
||||
|
||||
#ifdef TX_QUEUE_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of messages sent. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_performance_messages_sent_count;
|
||||
|
||||
|
||||
/* Define the total number of messages received. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_performance__messages_received_count;
|
||||
|
||||
|
||||
/* Define the total number of queue empty suspensions. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_performance_empty_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of queue full suspensions. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_performance_full_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of queue full errors. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_performance_full_error_count;
|
||||
|
||||
|
||||
/* Define the total number of queue timeouts. */
|
||||
|
||||
QUEUE_DECLARE ULONG _tx_queue_performance_timeout_count;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Define default post queue delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_QUEUE_DELETE_PORT_COMPLETION
|
||||
#define TX_QUEUE_DELETE_PORT_COMPLETION(q)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
144
common_smp/inc/tx_semaphore.h
Normal file
144
common_smp/inc/tx_semaphore.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Semaphore */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_semaphore.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX semaphore management component, */
|
||||
/* including all data types and external references. It is assumed */
|
||||
/* that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_SEMAPHORE_H
|
||||
#define TX_SEMAPHORE_H
|
||||
|
||||
|
||||
/* Define semaphore control specific data definitions. */
|
||||
|
||||
#define TX_SEMAPHORE_ID ((ULONG) 0x53454D41)
|
||||
|
||||
|
||||
/* Determine if in-line component initialization is supported by the
|
||||
caller. */
|
||||
#ifdef TX_INVOKE_INLINE_INITIALIZATION
|
||||
/* Yes, in-line initialization is supported, remap the
|
||||
semaphore initialization function. */
|
||||
#ifndef TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO
|
||||
#define _tx_semaphore_initialize() \
|
||||
_tx_semaphore_created_ptr = TX_NULL; \
|
||||
_tx_semaphore_created_count = TX_EMPTY
|
||||
#else
|
||||
#define _tx_semaphore_initialize() \
|
||||
_tx_semaphore_created_ptr = TX_NULL; \
|
||||
_tx_semaphore_created_count = TX_EMPTY; \
|
||||
_tx_semaphore_performance_put_count = ((ULONG) 0); \
|
||||
_tx_semaphore_performance_get_count = ((ULONG) 0); \
|
||||
_tx_semaphore_performance_suspension_count = ((ULONG) 0); \
|
||||
_tx_semaphore_performance_timeout_count = ((ULONG) 0)
|
||||
#endif
|
||||
#define TX_SEMAPHORE_INIT
|
||||
#else
|
||||
/* No in-line initialization is supported, use standard
|
||||
function call. */
|
||||
VOID _tx_semaphore_initialize(VOID);
|
||||
#endif
|
||||
|
||||
|
||||
/* Define internal semaphore management function prototypes. */
|
||||
|
||||
VOID _tx_semaphore_cleanup(TX_THREAD *thread_ptr, ULONG suspension_sequence);
|
||||
|
||||
|
||||
/* Semaphore management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_SEMAPHORE_INIT
|
||||
#define SEMAPHORE_DECLARE
|
||||
#else
|
||||
#define SEMAPHORE_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the head pointer of the created semaphore list. */
|
||||
|
||||
SEMAPHORE_DECLARE TX_SEMAPHORE * _tx_semaphore_created_ptr;
|
||||
|
||||
|
||||
/* Define the variable that holds the number of created semaphores. */
|
||||
|
||||
SEMAPHORE_DECLARE ULONG _tx_semaphore_created_count;
|
||||
|
||||
|
||||
#ifdef TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of semaphore puts. */
|
||||
|
||||
SEMAPHORE_DECLARE ULONG _tx_semaphore_performance_put_count;
|
||||
|
||||
|
||||
/* Define the total number of semaphore gets. */
|
||||
|
||||
SEMAPHORE_DECLARE ULONG _tx_semaphore_performance_get_count;
|
||||
|
||||
|
||||
/* Define the total number of semaphore suspensions. */
|
||||
|
||||
SEMAPHORE_DECLARE ULONG _tx_semaphore_performance_suspension_count;
|
||||
|
||||
|
||||
/* Define the total number of semaphore timeouts. */
|
||||
|
||||
SEMAPHORE_DECLARE ULONG _tx_semaphore_performance_timeout_count;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Define default post semaphore delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_SEMAPHORE_DELETE_PORT_COMPLETION
|
||||
#define TX_SEMAPHORE_DELETE_PORT_COMPLETION(s)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
1680
common_smp/inc/tx_thread.h
Normal file
1680
common_smp/inc/tx_thread.h
Normal file
File diff suppressed because it is too large
Load Diff
214
common_smp/inc/tx_timer.h
Normal file
214
common_smp/inc/tx_timer.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Timer */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_timer.h PORTABLE SMP */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX timer management component, including */
|
||||
/* data types and external references. It is assumed that tx_api.h */
|
||||
/* and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_TIMER_H
|
||||
#define TX_TIMER_H
|
||||
|
||||
|
||||
/* Define timer management specific data definitions. */
|
||||
|
||||
#define TX_TIMER_ID ((ULONG) 0x4154494D)
|
||||
#define TX_TIMER_ENTRIES ((ULONG) 32)
|
||||
|
||||
|
||||
/* Define internal timer management function prototypes. */
|
||||
|
||||
VOID _tx_timer_expiration_process(VOID);
|
||||
VOID _tx_timer_initialize(VOID);
|
||||
VOID _tx_timer_system_activate(TX_TIMER_INTERNAL *timer_ptr);
|
||||
VOID _tx_timer_system_deactivate(TX_TIMER_INTERNAL *timer_ptr);
|
||||
VOID _tx_timer_thread_entry(ULONG timer_thread_input);
|
||||
|
||||
|
||||
/* Timer management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#define TIMER_DECLARE extern
|
||||
|
||||
|
||||
/* Define the system clock value that is continually incremented by the
|
||||
periodic timer interrupt processing. */
|
||||
|
||||
TIMER_DECLARE volatile ULONG _tx_timer_system_clock;
|
||||
|
||||
|
||||
/* Define the current time slice value. If non-zero, a time-slice is active.
|
||||
Otherwise, the time_slice is not active. There is one of these entries
|
||||
per core. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_time_slice[TX_THREAD_SMP_MAX_CORES];
|
||||
|
||||
|
||||
/* Define count to detect when timer interrupt is active. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_interrupt_active;
|
||||
|
||||
|
||||
/* Define the time-slice expiration flag. This is used to indicate that a time-slice
|
||||
has happened. */
|
||||
|
||||
TIMER_DECLARE UINT _tx_timer_expired_time_slice;
|
||||
|
||||
|
||||
/* Define the thread and application timer entry list. This list provides a direct access
|
||||
method for insertion of times less than TX_TIMER_ENTRIES. */
|
||||
|
||||
TIMER_DECLARE TX_TIMER_INTERNAL *_tx_timer_list[TX_TIMER_ENTRIES];
|
||||
|
||||
|
||||
/* Define the boundary pointers to the list. These are setup to easily manage
|
||||
wrapping the list. */
|
||||
|
||||
TIMER_DECLARE TX_TIMER_INTERNAL **_tx_timer_list_start;
|
||||
TIMER_DECLARE TX_TIMER_INTERNAL **_tx_timer_list_end;
|
||||
|
||||
|
||||
/* Define the current timer pointer in the list. This pointer is moved sequentially
|
||||
through the timer list by the timer interrupt handler. */
|
||||
|
||||
TIMER_DECLARE TX_TIMER_INTERNAL **_tx_timer_current_ptr;
|
||||
|
||||
|
||||
/* Define the timer expiration flag. This is used to indicate that a timer
|
||||
has expired. */
|
||||
|
||||
TIMER_DECLARE UINT _tx_timer_expired;
|
||||
|
||||
|
||||
/* Define the created timer list head pointer. */
|
||||
|
||||
TIMER_DECLARE TX_TIMER *_tx_timer_created_ptr;
|
||||
|
||||
|
||||
/* Define the created timer count. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_created_count;
|
||||
|
||||
|
||||
/* Define the pointer to the timer that has expired and is being processed. */
|
||||
|
||||
TIMER_DECLARE TX_TIMER_INTERNAL *_tx_timer_expired_timer_ptr;
|
||||
|
||||
|
||||
#ifndef TX_TIMER_PROCESS_IN_ISR
|
||||
|
||||
/* Define the timer thread's control block. */
|
||||
|
||||
TIMER_DECLARE TX_THREAD _tx_timer_thread;
|
||||
|
||||
|
||||
/* Define the variable that holds the timer thread's starting stack address. */
|
||||
|
||||
TIMER_DECLARE VOID *_tx_timer_stack_start;
|
||||
|
||||
|
||||
/* Define the variable that holds the timer thread's stack size. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_stack_size;
|
||||
|
||||
|
||||
/* Define the variable that holds the timer thread's priority. */
|
||||
|
||||
TIMER_DECLARE UINT _tx_timer_priority;
|
||||
|
||||
/* Define the system timer thread's stack. The default size is defined
|
||||
in tx_port.h. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_thread_stack_area[(((UINT) TX_TIMER_THREAD_STACK_SIZE)+((sizeof(ULONG)) - ((UINT) 1)))/sizeof(ULONG)];
|
||||
|
||||
#else
|
||||
|
||||
|
||||
/* Define the busy flag that will prevent nested timer ISR processing. */
|
||||
|
||||
TIMER_DECLARE UINT _tx_timer_processing_active;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TX_TIMER_ENABLE_PERFORMANCE_INFO
|
||||
|
||||
/* Define the total number of timer activations. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_performance_activate_count;
|
||||
|
||||
|
||||
/* Define the total number of timer reactivations. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_performance_reactivate_count;
|
||||
|
||||
|
||||
/* Define the total number of timer deactivations. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_performance_deactivate_count;
|
||||
|
||||
|
||||
/* Define the total number of timer expirations. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_performance_expiration_count;
|
||||
|
||||
|
||||
/* Define the total number of timer expiration adjustments. These are required
|
||||
if the expiration time is greater than the size of the timer list. In such
|
||||
cases, the timer is placed at the end of the list and then reactivated
|
||||
as many times as necessary to finally achieve the resulting timeout. */
|
||||
|
||||
TIMER_DECLARE ULONG _tx_timer_performance__expiration_adjust_count;
|
||||
|
||||
#endif
|
||||
|
||||
/* Define default post timer delete macro to whitespace, if it hasn't been defined previously (typically in tx_port.h). */
|
||||
|
||||
#ifndef TX_TIMER_DELETE_PORT_COMPLETION
|
||||
#define TX_TIMER_DELETE_PORT_COMPLETION(t)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
561
common_smp/inc/tx_trace.h
Normal file
561
common_smp/inc/tx_trace.h
Normal file
@@ -0,0 +1,561 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** Trace */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* COMPONENT DEFINITION RELEASE */
|
||||
/* */
|
||||
/* tx_trace.h PORTABLE SMP */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file defines the ThreadX trace component, including constants */
|
||||
/* and structure definitions as well as external references. It is */
|
||||
/* assumed that tx_api.h and tx_port.h have already been included. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#ifndef TX_TRACE_H
|
||||
#define TX_TRACE_H
|
||||
|
||||
|
||||
/* Determine if tracing is enabled. If not, simply define the in-line trace
|
||||
macros to whitespace. */
|
||||
|
||||
#ifndef TX_ENABLE_EVENT_TRACE
|
||||
#define TX_TRACE_INITIALIZE
|
||||
#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b)
|
||||
#define TX_TRACE_OBJECT_UNREGISTER(o)
|
||||
#define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,f)
|
||||
#else
|
||||
|
||||
/* Event tracing is enabled. */
|
||||
|
||||
/* Ensure that the thread component information is included. */
|
||||
|
||||
#include "tx_thread.h"
|
||||
|
||||
|
||||
/* Define trace port-specfic extension to white space if it isn't defined
|
||||
already. */
|
||||
|
||||
#ifndef TX_TRACE_PORT_EXTENSION
|
||||
#define TX_TRACE_PORT_EXTENSION
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the default clock source for trace event entry time stamp. The following two item are port specific.
|
||||
For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
|
||||
source constants would be:
|
||||
|
||||
#define TX_TRACE_TIME_SOURCE *((ULONG *) 0x0a800024)
|
||||
#define TX_TRACE_TIME_MASK 0x0000FFFFUL
|
||||
|
||||
*/
|
||||
|
||||
#ifndef TX_TRACE_TIME_SOURCE
|
||||
#define TX_TRACE_TIME_SOURCE ++_tx_trace_simulated_time
|
||||
#endif
|
||||
#ifndef TX_TRACE_TIME_MASK
|
||||
#define TX_TRACE_TIME_MASK 0xFFFFFFFFUL
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the ID showing the event trace buffer is valid. */
|
||||
|
||||
#define TX_TRACE_VALID 0x54585442UL
|
||||
|
||||
|
||||
/* ThreadX Trace Description. The ThreadX Trace feature is designed to capture
|
||||
events in real-time in a circular event buffer. This buffer may be analyzed by other
|
||||
tools. The high-level format of the Trace structure is:
|
||||
|
||||
[Trace Control Header ]
|
||||
[Trace Object Registry - Entry 0 ]
|
||||
...
|
||||
[Trace Object Registry - Entry "n" ]
|
||||
[Trace Buffer - Entry 0 ]
|
||||
...
|
||||
[Trace Buffer - Entry "n" ]
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* Trace Control Header. The Trace Control Header contains information that
|
||||
defines the format of the Trace Object Registry as well as the location and
|
||||
current entry of the Trace Buffer itself. The high-level format of the
|
||||
Trace Control Header is:
|
||||
|
||||
Entry Size Description
|
||||
|
||||
[Trace ID] 4 This 4-byte field contains the ThreadX Trace
|
||||
Identification. If the trace buffer is valid, the
|
||||
contents are 0x54585442 (TXTB). Since it is written as
|
||||
a 32-bit unsigned word, this value is also used to
|
||||
determine if the event trace information is in
|
||||
little or big endian format.
|
||||
[Timer Valid Mask] 4 Mask of valid bits in the 32-bit time stamp. This
|
||||
enables use of 32, 24, 16, or event 8-bit timers.
|
||||
If the time source is 32-bits, the mask is
|
||||
0xFFFFFFFF. If the time source is 16-bits, the
|
||||
mask is 0x0000FFFF.
|
||||
[Trace Base Address] 4 The base address for all trace pointer. Subtracting
|
||||
the pointer and this address will yield the proper
|
||||
offset into the trace buffer.
|
||||
[Trace Object Registry Start Pointer] 4 Pointer to the start of Trace Object Registry
|
||||
[Reserved] 2 Reserved two bytes - should be 0x0000
|
||||
[Trace Object Object Name Size] 2 Number of bytes in object name
|
||||
[Trace Object Registry End Pointer] 4 Pointer to the end of Trace Object Registry
|
||||
[Trace Buffer Start Pointer] 4 Pointer to the start of the Trace Buffer Area
|
||||
[Trace Buffer End Pointer] 4 Pointer to the end of the Trace Buffer Area
|
||||
[Trace Buffer Current Pointer] 4 Pointer to the oldest entry in the Trace Buffer.
|
||||
This entry will be overwritten on the next event and
|
||||
incremented to the next event (wrapping to the top
|
||||
if the buffer end pointer is exceeded).
|
||||
[Reserved] 4 Reserved 4 bytes, should be 0xAAAAAAAA
|
||||
[Reserved] 4 Reserved 4 bytes, should be 0xBBBBBBBB
|
||||
[Reserved] 4 Reserved 4 bytes, should be 0xCCCCCCCC
|
||||
*/
|
||||
|
||||
|
||||
/* Define the Trace Control Header. */
|
||||
|
||||
typedef struct TX_TRACE_HEADER_STRUCT
|
||||
{
|
||||
|
||||
ULONG tx_trace_header_id;
|
||||
ULONG tx_trace_header_timer_valid_mask;
|
||||
ULONG tx_trace_header_trace_base_address;
|
||||
ULONG tx_trace_header_registry_start_pointer;
|
||||
USHORT tx_trace_header_reserved1;
|
||||
USHORT tx_trace_header_object_name_size;
|
||||
ULONG tx_trace_header_registry_end_pointer;
|
||||
ULONG tx_trace_header_buffer_start_pointer;
|
||||
ULONG tx_trace_header_buffer_end_pointer;
|
||||
ULONG tx_trace_header_buffer_current_pointer;
|
||||
ULONG tx_trace_header_reserved2;
|
||||
ULONG tx_trace_header_reserved3;
|
||||
ULONG tx_trace_header_reserved4;
|
||||
} TX_TRACE_HEADER;
|
||||
|
||||
|
||||
/* Trace Object Registry. The Trace Object Registry is used to map the object pointer in the trace buffer to
|
||||
the application's name for the object (defined during object creation in ThreadX). */
|
||||
|
||||
#ifndef TX_TRACE_OBJECT_REGISTRY_NAME
|
||||
#define TX_TRACE_OBJECT_REGISTRY_NAME 32
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the object name types as well as the contents of any additional parameters that might be useful in
|
||||
trace analysis. */
|
||||
|
||||
#define TX_TRACE_OBJECT_TYPE_NOT_VALID ((UCHAR) 0) /* Object is not valid */
|
||||
#define TX_TRACE_OBJECT_TYPE_THREAD ((UCHAR) 1) /* P1 = stack start address, P2 = stack size */
|
||||
#define TX_TRACE_OBJECT_TYPE_TIMER ((UCHAR) 2) /* P1 = initial ticks, P2 = reschedule ticks */
|
||||
#define TX_TRACE_OBJECT_TYPE_QUEUE ((UCHAR) 3) /* P1 = queue size, P2 = message size */
|
||||
#define TX_TRACE_OBJECT_TYPE_SEMAPHORE ((UCHAR) 4) /* P1 = initial instances */
|
||||
#define TX_TRACE_OBJECT_TYPE_MUTEX ((UCHAR) 5) /* P1 = priority inheritance flag */
|
||||
#define TX_TRACE_OBJECT_TYPE_EVENT_FLAGS ((UCHAR) 6) /* none */
|
||||
#define TX_TRACE_OBJECT_TYPE_BLOCK_POOL ((UCHAR) 7) /* P1 = total blocks, P2 = block size */
|
||||
#define TX_TRACE_OBJECT_TYPE_BYTE_POOL ((UCHAR) 8) /* P1 = total bytes */
|
||||
|
||||
|
||||
typedef struct TX_TRACE_OBJECT_ENTRY_STRUCT
|
||||
{
|
||||
|
||||
UCHAR tx_trace_object_entry_available; /* TX_TRUE -> available */
|
||||
UCHAR tx_trace_object_entry_type; /* Types defined above */
|
||||
UCHAR tx_trace_object_entry_reserved1; /* Should be zero - except for thread */
|
||||
UCHAR tx_trace_object_entry_reserved2; /* Should be zero - except for thread */
|
||||
ULONG tx_trace_object_entry_thread_pointer; /* ThreadX object pointer */
|
||||
ULONG tx_trace_object_entry_param_1; /* Parameter value defined */
|
||||
ULONG tx_trace_object_entry_param_2; /* according to type above */
|
||||
UCHAR tx_trace_object_entry_name[TX_TRACE_OBJECT_REGISTRY_NAME]; /* Object name */
|
||||
} TX_TRACE_OBJECT_ENTRY;
|
||||
|
||||
|
||||
/* Trace Buffer Entry. The Trace Buffer Entry contains information about a particular
|
||||
event in the system. The high-level format of the Trace Buffer Entry is:
|
||||
|
||||
Entry Size Description
|
||||
|
||||
[Thread Pointer] 4 This 4-byte field contains the pointer to the
|
||||
ThreadX thread running that caused the event.
|
||||
If this field is NULL, the entry hasn't been used
|
||||
yet. If this field is 0xFFFFFFFF, the event occurred
|
||||
from within an ISR. If this entry is 0xF0F0F0F0, the
|
||||
event occurred during initialization.
|
||||
[Thread Priority or 4 This 4-byte field contains the current thread pointer for interrupt
|
||||
Current Thread events or the thread preemption-threshold/priority for thread events.
|
||||
Preemption-Threshold/
|
||||
Priority]
|
||||
[Event ID] 4 This 4-byte field contains the Event ID of the event. A value of
|
||||
0xFFFFFFFF indicates the event is invalid. All events are marked
|
||||
as invalid during initialization.
|
||||
[Time Stamp] 4 This 4-byte field contains the time stamp of the event.
|
||||
[Information Field 1] 4 This 4-byte field contains the first 4-bytes of information
|
||||
specific to the event.
|
||||
[Information Field 2] 4 This 4-byte field contains the second 4-bytes of information
|
||||
specific to the event.
|
||||
[Information Field 3] 4 This 4-byte field contains the third 4-bytes of information
|
||||
specific to the event.
|
||||
[Information Field 4] 4 This 4-byte field contains the fourth 4-bytes of information
|
||||
specific to the event.
|
||||
*/
|
||||
|
||||
#define TX_TRACE_INVALID_EVENT 0xFFFFFFFFUL
|
||||
|
||||
|
||||
/* Define ThreadX Trace Events, along with a brief description of the additional information fields,
|
||||
where I1 -> Information Field 1, I2 -> Information Field 2, etc. */
|
||||
|
||||
/* Event numbers 0 through 4095 are reserved by Express Logic. Specific event assignments are:
|
||||
|
||||
ThreadX events: 1-199
|
||||
FileX events: 200-299
|
||||
NetX events: 300-599
|
||||
USBX events: 600-999
|
||||
|
||||
User-defined event numbers start at 4096 and continue through 65535, as defined by the constants
|
||||
TX_TRACE_USER_EVENT_START and TX_TRACE_USER_EVENT_END, respectively. User events should be based
|
||||
on these constants in case the user event number assignment is changed in future releases. */
|
||||
|
||||
/* Define the basic ThreadX thread scheduling events first. */
|
||||
|
||||
#define TX_TRACE_THREAD_RESUME 1 /* I1 = thread ptr, I2 = previous_state, I3 = stack ptr, I4 = next thread */
|
||||
#define TX_TRACE_THREAD_SUSPEND 2 /* I1 = thread ptr, I2 = new_state, I3 = stack ptr I4 = next thread */
|
||||
#define TX_TRACE_ISR_ENTER 3 /* I1 = stack_ptr, I2 = ISR number, I3 = system state, I4 = preempt disable */
|
||||
#define TX_TRACE_ISR_EXIT 4 /* I1 = stack_ptr, I2 = ISR number, I3 = system state, I4 = preempt disable */
|
||||
#define TX_TRACE_TIME_SLICE 5 /* I1 = next thread ptr, I2 = system state, I3 = preempt disable, I4 = stack*/
|
||||
#define TX_TRACE_RUNNING 6 /* None */
|
||||
|
||||
|
||||
/* Define the rest of the ThreadX system events. */
|
||||
|
||||
#define TX_TRACE_BLOCK_ALLOCATE 10 /* I1 = pool ptr, I2 = memory ptr, I3 = wait option, I4 = remaining blocks */
|
||||
#define TX_TRACE_BLOCK_POOL_CREATE 11 /* I1 = pool ptr, I2 = pool_start, I3 = total blocks, I4 = block size */
|
||||
#define TX_TRACE_BLOCK_POOL_DELETE 12 /* I1 = pool ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_BLOCK_POOL_INFO_GET 13 /* I1 = pool ptr */
|
||||
#define TX_TRACE_BLOCK_POOL_PERFORMANCE_INFO_GET 14 /* I1 = pool ptr */
|
||||
#define TX_TRACE_BLOCK_POOL__PERFORMANCE_SYSTEM_INFO_GET 15 /* None */
|
||||
#define TX_TRACE_BLOCK_POOL_PRIORITIZE 16 /* I1 = pool ptr, I2 = suspended count, I3 = stack ptr */
|
||||
#define TX_TRACE_BLOCK_RELEASE 17 /* I1 = pool ptr, I2 = memory ptr, I3 = suspended, I4 = stack ptr */
|
||||
#define TX_TRACE_BYTE_ALLOCATE 20 /* I1 = pool ptr, I2 = memory ptr, I3 = size requested, I4 = wait option */
|
||||
#define TX_TRACE_BYTE_POOL_CREATE 21 /* I1 = pool ptr, I2 = start ptr, I3 = pool size, I4 = stack ptr */
|
||||
#define TX_TRACE_BYTE_POOL_DELETE 22 /* I1 = pool ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_BYTE_POOL_INFO_GET 23 /* I1 = pool ptr */
|
||||
#define TX_TRACE_BYTE_POOL_PERFORMANCE_INFO_GET 24 /* I1 = pool ptr */
|
||||
#define TX_TRACE_BYTE_POOL__PERFORMANCE_SYSTEM_INFO_GET 25 /* None */
|
||||
#define TX_TRACE_BYTE_POOL_PRIORITIZE 26 /* I1 = pool ptr, I2 = suspended count, I3 = stack ptr */
|
||||
#define TX_TRACE_BYTE_RELEASE 27 /* I1 = pool ptr, I2 = memory ptr, I3 = suspended, I4 = available bytes */
|
||||
#define TX_TRACE_EVENT_FLAGS_CREATE 30 /* I1 = group ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_EVENT_FLAGS_DELETE 31 /* I1 = group ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_EVENT_FLAGS_GET 32 /* I1 = group ptr, I2 = requested flags, I3 = current flags, I4 = get option*/
|
||||
#define TX_TRACE_EVENT_FLAGS_INFO_GET 33 /* I1 = group ptr */
|
||||
#define TX_TRACE_EVENT_FLAGS_PERFORMANCE_INFO_GET 34 /* I1 = group ptr */
|
||||
#define TX_TRACE_EVENT_FLAGS__PERFORMANCE_SYSTEM_INFO_GET 35 /* None */
|
||||
#define TX_TRACE_EVENT_FLAGS_SET 36 /* I1 = group ptr, I2 = flags to set, I3 = set option, I4= suspended count */
|
||||
#define TX_TRACE_EVENT_FLAGS_SET_NOTIFY 37 /* I1 = group ptr */
|
||||
#define TX_TRACE_INTERRUPT_CONTROL 40 /* I1 = new interrupt posture, I2 = stack ptr */
|
||||
#define TX_TRACE_MUTEX_CREATE 50 /* I1 = mutex ptr, I2 = inheritance, I3 = stack ptr */
|
||||
#define TX_TRACE_MUTEX_DELETE 51 /* I1 = mutex ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_MUTEX_GET 52 /* I1 = mutex ptr, I2 = wait option, I3 = owning thread, I4 = own count */
|
||||
#define TX_TRACE_MUTEX_INFO_GET 53 /* I1 = mutex ptr */
|
||||
#define TX_TRACE_MUTEX_PERFORMANCE_INFO_GET 54 /* I1 = mutex ptr */
|
||||
#define TX_TRACE_MUTEX_PERFORMANCE_SYSTEM_INFO_GET 55 /* None */
|
||||
#define TX_TRACE_MUTEX_PRIORITIZE 56 /* I1 = mutex ptr, I2 = suspended count, I3 = stack ptr */
|
||||
#define TX_TRACE_MUTEX_PUT 57 /* I1 = mutex ptr, I2 = owning thread, I3 = own count, I4 = stack ptr */
|
||||
#define TX_TRACE_QUEUE_CREATE 60 /* I1 = queue ptr, I2 = message size, I3 = queue start, I4 = queue size */
|
||||
#define TX_TRACE_QUEUE_DELETE 61 /* I1 = queue ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_QUEUE_FLUSH 62 /* I1 = queue ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_QUEUE_FRONT_SEND 63 /* I1 = queue ptr, I2 = source ptr, I3 = wait option, I4 = enqueued */
|
||||
#define TX_TRACE_QUEUE_INFO_GET 64 /* I1 = queue ptr */
|
||||
#define TX_TRACE_QUEUE_PERFORMANCE_INFO_GET 65 /* I1 = queue ptr */
|
||||
#define TX_TRACE_QUEUE_PERFORMANCE_SYSTEM_INFO_GET 66 /* None */
|
||||
#define TX_TRACE_QUEUE_PRIORITIZE 67 /* I1 = queue ptr, I2 = suspended count, I3 = stack ptr */
|
||||
#define TX_TRACE_QUEUE_RECEIVE 68 /* I1 = queue ptr, I2 = destination ptr, I3 = wait option, I4 = enqueued */
|
||||
#define TX_TRACE_QUEUE_SEND 69 /* I1 = queue ptr, I2 = source ptr, I3 = wait option, I4 = enqueued */
|
||||
#define TX_TRACE_QUEUE_SEND_NOTIFY 70 /* I1 = queue ptr */
|
||||
#define TX_TRACE_SEMAPHORE_CEILING_PUT 80 /* I1 = semaphore ptr, I2 = current count, I3 = suspended count,I4 =ceiling */
|
||||
#define TX_TRACE_SEMAPHORE_CREATE 81 /* I1 = semaphore ptr, I2 = initial count, I3 = stack ptr */
|
||||
#define TX_TRACE_SEMAPHORE_DELETE 82 /* I1 = semaphore ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_SEMAPHORE_GET 83 /* I1 = semaphore ptr, I2 = wait option, I3 = current count, I4 = stack ptr */
|
||||
#define TX_TRACE_SEMAPHORE_INFO_GET 84 /* I1 = semaphore ptr */
|
||||
#define TX_TRACE_SEMAPHORE_PERFORMANCE_INFO_GET 85 /* I1 = semaphore ptr */
|
||||
#define TX_TRACE_SEMAPHORE__PERFORMANCE_SYSTEM_INFO_GET 86 /* None */
|
||||
#define TX_TRACE_SEMAPHORE_PRIORITIZE 87 /* I1 = semaphore ptr, I2 = suspended count, I2 = stack ptr */
|
||||
#define TX_TRACE_SEMAPHORE_PUT 88 /* I1 = semaphore ptr, I2 = current count, I3 = suspended count,I4=stack ptr*/
|
||||
#define TX_TRACE_SEMAPHORE_PUT_NOTIFY 89 /* I1 = semaphore ptr */
|
||||
#define TX_TRACE_THREAD_CREATE 100 /* I1 = thread ptr, I2 = priority, I3 = stack ptr, I4 = stack_size */
|
||||
#define TX_TRACE_THREAD_DELETE 101 /* I1 = thread ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_THREAD_ENTRY_EXIT_NOTIFY 102 /* I1 = thread ptr, I2 = thread state, I3 = stack ptr */
|
||||
#define TX_TRACE_THREAD_IDENTIFY 103 /* None */
|
||||
#define TX_TRACE_THREAD_INFO_GET 104 /* I1 = thread ptr, I2 = thread state */
|
||||
#define TX_TRACE_THREAD_PERFORMANCE_INFO_GET 105 /* I1 = thread ptr, I2 = thread state */
|
||||
#define TX_TRACE_THREAD_PERFORMANCE_SYSTEM_INFO_GET 106 /* None */
|
||||
#define TX_TRACE_THREAD_PREEMPTION_CHANGE 107 /* I1 = thread ptr, I2 = new threshold, I3 = old threshold, I4 =thread state*/
|
||||
#define TX_TRACE_THREAD_PRIORITY_CHANGE 108 /* I1 = thread ptr, I2 = new priority, I3 = old priority, I4 = thread state */
|
||||
#define TX_TRACE_THREAD_RELINQUISH 109 /* I1 = stack ptr, I2 = next thread ptr */
|
||||
#define TX_TRACE_THREAD_RESET 110 /* I1 = thread ptr, I2 = thread state */
|
||||
#define TX_TRACE_THREAD_RESUME_API 111 /* I1 = thread ptr, I2 = thread state, I3 = stack ptr */
|
||||
#define TX_TRACE_THREAD_SLEEP 112 /* I1 = sleep value, I2 = thread state, I3 = stack ptr */
|
||||
#define TX_TRACE_THREAD_STACK_ERROR_NOTIFY 113 /* None */
|
||||
#define TX_TRACE_THREAD_SUSPEND_API 114 /* I1 = thread ptr, I2 = thread state, I3 = stack ptr */
|
||||
#define TX_TRACE_THREAD_TERMINATE 115 /* I1 = thread ptr, I2 = thread state, I3 = stack ptr */
|
||||
#define TX_TRACE_THREAD_TIME_SLICE_CHANGE 116 /* I1 = thread ptr, I2 = new timeslice, I3 = old timeslice */
|
||||
#define TX_TRACE_THREAD_WAIT_ABORT 117 /* I1 = thread ptr, I2 = thread state, I3 = stack ptr */
|
||||
#define TX_TRACE_TIME_GET 120 /* I1 = current time, I2 = stack ptr */
|
||||
#define TX_TRACE_TIME_SET 121 /* I1 = new time */
|
||||
#define TX_TRACE_TIMER_ACTIVATE 122 /* I1 = timer ptr */
|
||||
#define TX_TRACE_TIMER_CHANGE 123 /* I1 = timer ptr, I2 = initial ticks, I3= reschedule ticks */
|
||||
#define TX_TRACE_TIMER_CREATE 124 /* I1 = timer ptr, I2 = initial ticks, I3= reschedule ticks, I4 = enable */
|
||||
#define TX_TRACE_TIMER_DEACTIVATE 125 /* I1 = timer ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_TIMER_DELETE 126 /* I1 = timer ptr */
|
||||
#define TX_TRACE_TIMER_INFO_GET 127 /* I1 = timer ptr, I2 = stack ptr */
|
||||
#define TX_TRACE_TIMER_PERFORMANCE_INFO_GET 128 /* I1 = timer ptr */
|
||||
#define TX_TRACE_TIMER_PERFORMANCE_SYSTEM_INFO_GET 129 /* None */
|
||||
|
||||
|
||||
/* Define the an Trace Buffer Entry. */
|
||||
|
||||
typedef struct TX_TRACE_BUFFER_ENTRY_STRUCT
|
||||
{
|
||||
|
||||
ULONG tx_trace_buffer_entry_thread_pointer;
|
||||
ULONG tx_trace_buffer_entry_thread_priority;
|
||||
ULONG tx_trace_buffer_entry_event_id;
|
||||
ULONG tx_trace_buffer_entry_time_stamp;
|
||||
#ifdef TX_MISRA_ENABLE
|
||||
ULONG tx_trace_buffer_entry_info_1;
|
||||
ULONG tx_trace_buffer_entry_info_2;
|
||||
ULONG tx_trace_buffer_entry_info_3;
|
||||
ULONG tx_trace_buffer_entry_info_4;
|
||||
#else
|
||||
ULONG tx_trace_buffer_entry_information_field_1;
|
||||
ULONG tx_trace_buffer_entry_information_field_2;
|
||||
ULONG tx_trace_buffer_entry_information_field_3;
|
||||
ULONG tx_trace_buffer_entry_information_field_4;
|
||||
#endif
|
||||
} TX_TRACE_BUFFER_ENTRY;
|
||||
|
||||
|
||||
/* Trace management component data declarations follow. */
|
||||
|
||||
/* Determine if the initialization function of this component is including
|
||||
this file. If so, make the data definitions really happen. Otherwise,
|
||||
make them extern so other functions in the component can access them. */
|
||||
|
||||
#ifdef TX_TRACE_INIT
|
||||
#define TRACE_DECLARE
|
||||
#else
|
||||
#define TRACE_DECLARE extern
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the pointer to the start of the trace buffer control structure. */
|
||||
|
||||
TRACE_DECLARE TX_TRACE_HEADER *_tx_trace_header_ptr;
|
||||
|
||||
|
||||
/* Define the pointer to the start of the trace object registry area in the trace buffer. */
|
||||
|
||||
TRACE_DECLARE TX_TRACE_OBJECT_ENTRY *_tx_trace_registry_start_ptr;
|
||||
|
||||
|
||||
/* Define the pointer to the end of the trace object registry area in the trace buffer. */
|
||||
|
||||
TRACE_DECLARE TX_TRACE_OBJECT_ENTRY *_tx_trace_registry_end_ptr;
|
||||
|
||||
|
||||
/* Define the pointer to the starting entry of the actual trace event area of the trace buffer. */
|
||||
|
||||
TRACE_DECLARE TX_TRACE_BUFFER_ENTRY *_tx_trace_buffer_start_ptr;
|
||||
|
||||
|
||||
/* Define the pointer to the ending entry of the actual trace event area of the trace buffer. */
|
||||
|
||||
TRACE_DECLARE TX_TRACE_BUFFER_ENTRY *_tx_trace_buffer_end_ptr;
|
||||
|
||||
|
||||
/* Define the pointer to the current entry of the actual trace event area of the trace buffer. */
|
||||
|
||||
TRACE_DECLARE TX_TRACE_BUFFER_ENTRY *_tx_trace_buffer_current_ptr;
|
||||
|
||||
|
||||
/* Define the trace event enable bits, where each bit represents a type of event that can be enabled
|
||||
or disabled dynamically by the application. */
|
||||
|
||||
TRACE_DECLARE ULONG _tx_trace_event_enable_bits;
|
||||
|
||||
|
||||
/* Define a counter that is used in environments that don't have a timer source. This counter
|
||||
is incremented on each use giving each event a unique timestamp. */
|
||||
|
||||
TRACE_DECLARE ULONG _tx_trace_simulated_time;
|
||||
|
||||
|
||||
/* Define the function pointer used to call the application when the trace buffer wraps. If NULL,
|
||||
the application has not registered a callback function. */
|
||||
|
||||
TRACE_DECLARE VOID (*_tx_trace_full_notify_function)(VOID *buffer);
|
||||
|
||||
|
||||
/* Define the total number of registry entries. */
|
||||
|
||||
TRACE_DECLARE ULONG _tx_trace_total_registry_entries;
|
||||
|
||||
|
||||
/* Define a counter that is used to track the number of available registry entries. */
|
||||
|
||||
TRACE_DECLARE ULONG _tx_trace_available_registry_entries;
|
||||
|
||||
|
||||
/* Define an index that represents the start of the registry search. */
|
||||
|
||||
TRACE_DECLARE ULONG _tx_trace_registry_search_start;
|
||||
|
||||
|
||||
/* Define the event trace macros that are expanded in-line when event tracing is enabled. */
|
||||
|
||||
#ifdef TX_MISRA_ENABLE
|
||||
#define TX_TRACE_INFO_FIELD_ASSIGNMENT(a,b,c,d) trace_event_ptr -> tx_trace_buffer_entry_info_1 = (ULONG) (a); trace_event_ptr -> tx_trace_buffer_entry_info_2 = (ULONG) (b); trace_event_ptr -> tx_trace_buffer_entry_info_3 = (ULONG) (c); trace_event_ptr -> tx_trace_buffer_entry_info_4 = (ULONG) (d);
|
||||
#else
|
||||
#define TX_TRACE_INFO_FIELD_ASSIGNMENT(a,b,c,d) trace_event_ptr -> tx_trace_buffer_entry_information_field_1 = (ULONG) (a); trace_event_ptr -> tx_trace_buffer_entry_information_field_2 = (ULONG) (b); trace_event_ptr -> tx_trace_buffer_entry_information_field_3 = (ULONG) (c); trace_event_ptr -> tx_trace_buffer_entry_information_field_4 = (ULONG) (d);
|
||||
#endif
|
||||
|
||||
|
||||
#define TX_TRACE_INITIALIZE _tx_trace_initialize();
|
||||
#define TX_TRACE_OBJECT_REGISTER(t,p,n,a,b) _tx_trace_object_register((UCHAR) (t), (VOID *) (p), (CHAR *) (n), (ULONG) (a), (ULONG) (b));
|
||||
#define TX_TRACE_OBJECT_UNREGISTER(o) _tx_trace_object_unregister((VOID *) (o));
|
||||
#ifndef TX_TRACE_IN_LINE_INSERT
|
||||
#define TX_TRACE_IN_LINE_INSERT(i,a,b,c,d,e) \
|
||||
{ \
|
||||
TX_TRACE_BUFFER_ENTRY *trace_event_ptr; \
|
||||
ULONG trace_system_state; \
|
||||
ULONG trace_priority; \
|
||||
TX_THREAD *trace_thread_ptr; \
|
||||
ULONG core; \
|
||||
trace_event_ptr = _tx_trace_buffer_current_ptr; \
|
||||
if ((trace_event_ptr) && (_tx_trace_event_enable_bits & ((ULONG) (e)))) \
|
||||
{ \
|
||||
TX_TRACE_PORT_EXTENSION \
|
||||
trace_system_state = (ULONG) _tx_thread_smp_current_state_get(); \
|
||||
TX_THREAD_GET_CURRENT(trace_thread_ptr) \
|
||||
\
|
||||
if (trace_system_state == ((ULONG) 0)) \
|
||||
{ \
|
||||
trace_priority = trace_thread_ptr -> tx_thread_priority; \
|
||||
trace_priority = trace_priority | 0x80000000UL | (trace_thread_ptr -> tx_thread_preempt_threshold << 16); \
|
||||
} \
|
||||
else if (trace_system_state < 0xF0F0F0F0UL) \
|
||||
{ \
|
||||
trace_priority = (ULONG) trace_thread_ptr; \
|
||||
trace_thread_ptr = (TX_THREAD *) 0xFFFFFFFFUL; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
trace_thread_ptr = (TX_THREAD *) 0xF0F0F0F0UL; \
|
||||
trace_priority = (ULONG) 0; \
|
||||
} \
|
||||
trace_event_ptr -> tx_trace_buffer_entry_thread_pointer = (ULONG) trace_thread_ptr; \
|
||||
trace_event_ptr -> tx_trace_buffer_entry_thread_priority = (ULONG) trace_priority; \
|
||||
core = _tx_thread_smp_core_get(); \
|
||||
trace_event_ptr -> tx_trace_buffer_entry_event_id = (ULONG) (core << 24) | (i); \
|
||||
trace_event_ptr -> tx_trace_buffer_entry_time_stamp = (ULONG) TX_TRACE_TIME_SOURCE; \
|
||||
TX_TRACE_INFO_FIELD_ASSIGNMENT((a),(b),(c),(d)) \
|
||||
trace_event_ptr++; \
|
||||
if (trace_event_ptr >= _tx_trace_buffer_end_ptr) \
|
||||
{ \
|
||||
trace_event_ptr = _tx_trace_buffer_start_ptr; \
|
||||
_tx_trace_buffer_current_ptr = trace_event_ptr; \
|
||||
_tx_trace_header_ptr -> tx_trace_header_buffer_current_pointer = (ULONG) trace_event_ptr; \
|
||||
if (_tx_trace_full_notify_function) \
|
||||
(_tx_trace_full_notify_function)((VOID *) _tx_trace_header_ptr); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_tx_trace_buffer_current_ptr = trace_event_ptr; \
|
||||
_tx_trace_header_ptr -> tx_trace_header_buffer_current_pointer = (ULONG) trace_event_ptr; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TX_SOURCE_CODE
|
||||
|
||||
/* Define internal function prototypes of the trace component, only if compiling ThreadX source code. */
|
||||
|
||||
VOID _tx_trace_initialize(VOID);
|
||||
VOID _tx_trace_object_register(UCHAR object_type, VOID *object_ptr, CHAR *object_name, ULONG parameter_1, ULONG parameter_2);
|
||||
VOID _tx_trace_object_unregister(VOID *object_ptr);
|
||||
|
||||
#ifdef TX_ENABLE_EVENT_TRACE
|
||||
|
||||
/* Check for MISRA compliance requirements. */
|
||||
|
||||
#ifdef TX_MISRA_ENABLE
|
||||
|
||||
/* Define MISRA-specific routines. */
|
||||
|
||||
UCHAR *_tx_misra_object_to_uchar_pointer_convert(TX_TRACE_OBJECT_ENTRY *pointer);
|
||||
TX_TRACE_OBJECT_ENTRY *_tx_misra_uchar_to_object_pointer_convert(UCHAR *pointer);
|
||||
TX_TRACE_HEADER *_tx_misra_uchar_to_header_pointer_convert(UCHAR *pointer);
|
||||
TX_TRACE_BUFFER_ENTRY *_tx_misra_uchar_to_entry_pointer_convert(UCHAR *pointer);
|
||||
UCHAR *_tx_misra_entry_to_uchar_pointer_convert(TX_TRACE_BUFFER_ENTRY *pointer);
|
||||
|
||||
|
||||
#define TX_OBJECT_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_object_to_uchar_pointer_convert((a))
|
||||
#define TX_UCHAR_TO_OBJECT_POINTER_CONVERT(a) _tx_misra_uchar_to_object_pointer_convert((a))
|
||||
#define TX_UCHAR_TO_HEADER_POINTER_CONVERT(a) _tx_misra_uchar_to_header_pointer_convert((a))
|
||||
#define TX_UCHAR_TO_ENTRY_POINTER_CONVERT(a) _tx_misra_uchar_to_entry_pointer_convert((a))
|
||||
#define TX_ENTRY_TO_UCHAR_POINTER_CONVERT(a) _tx_misra_entry_to_uchar_pointer_convert((a))
|
||||
|
||||
#else
|
||||
|
||||
#define TX_OBJECT_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a)))
|
||||
#define TX_UCHAR_TO_OBJECT_POINTER_CONVERT(a) ((TX_TRACE_OBJECT_ENTRY *) ((VOID *) (a)))
|
||||
#define TX_UCHAR_TO_HEADER_POINTER_CONVERT(a) ((TX_TRACE_HEADER *) ((VOID *) (a)))
|
||||
#define TX_UCHAR_TO_ENTRY_POINTER_CONVERT(a) ((TX_TRACE_BUFFER_ENTRY *) ((VOID *) (a)))
|
||||
#define TX_ENTRY_TO_UCHAR_POINTER_CONVERT(a) ((UCHAR *) ((VOID *) (a)))
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
257
common_smp/inc/tx_user.h
Normal file
257
common_smp/inc/tx_user.h
Normal file
@@ -0,0 +1,257 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||
/* */
|
||||
/* This software is licensed under the Microsoft Software License */
|
||||
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||
/* and in the root directory of this software. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** ThreadX Component */
|
||||
/** */
|
||||
/** User Specific */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* tx_user.h PORTABLE C */
|
||||
/* 6.0.1 */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file contains user defines for configuring ThreadX in specific */
|
||||
/* ways. This file will have an effect only if the application and */
|
||||
/* ThreadX library are built with TX_INCLUDE_USER_DEFINE_FILE defined. */
|
||||
/* Note that all the defines in this file may also be made on the */
|
||||
/* command line when building ThreadX library and application objects. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_USER_H
|
||||
#define TX_USER_H
|
||||
|
||||
|
||||
/* Define various build options for the ThreadX port. The application should either make changes
|
||||
here by commenting or un-commenting the conditional compilation defined OR supply the defines
|
||||
though the compiler's equivalent of the -D option.
|
||||
|
||||
For maximum speed, the following should be defined:
|
||||
|
||||
TX_MAX_PRIORITIES 32
|
||||
TX_DISABLE_PREEMPTION_THRESHOLD
|
||||
TX_DISABLE_REDUNDANT_CLEARING
|
||||
TX_DISABLE_NOTIFY_CALLBACKS
|
||||
TX_NOT_INTERRUPTABLE
|
||||
TX_TIMER_PROCESS_IN_ISR
|
||||
TX_REACTIVATE_INLINE
|
||||
TX_DISABLE_STACK_FILLING
|
||||
TX_INLINE_THREAD_RESUME_SUSPEND
|
||||
|
||||
For minimum size, the following should be defined:
|
||||
|
||||
TX_MAX_PRIORITIES 32
|
||||
TX_DISABLE_PREEMPTION_THRESHOLD
|
||||
TX_DISABLE_REDUNDANT_CLEARING
|
||||
TX_DISABLE_NOTIFY_CALLBACKS
|
||||
TX_NOT_INTERRUPTABLE
|
||||
TX_TIMER_PROCESS_IN_ISR
|
||||
|
||||
Of course, many of these defines reduce functionality and/or change the behavior of the
|
||||
system in ways that may not be worth the trade-off. For example, the TX_TIMER_PROCESS_IN_ISR
|
||||
results in faster and smaller code, however, it increases the amount of processing in the ISR.
|
||||
In addition, some services that are available in timers are not available from ISRs and will
|
||||
therefore return an error if this option is used. This may or may not be desirable for a
|
||||
given application. */
|
||||
|
||||
|
||||
/* Override various options with default values already assigned in tx_port.h. Please also refer
|
||||
to tx_port.h for descriptions on each of these options. */
|
||||
|
||||
/*
|
||||
#define TX_MAX_PRIORITIES 32
|
||||
#define TX_MINIMUM_STACK ????
|
||||
#define TX_THREAD_USER_EXTENSION ????
|
||||
#define TX_TIMER_THREAD_STACK_SIZE ????
|
||||
#define TX_TIMER_THREAD_PRIORITY ????
|
||||
*/
|
||||
|
||||
/* Determine if timer expirations (application timers, timeouts, and tx_thread_sleep calls
|
||||
should be processed within the a system timer thread or directly in the timer ISR.
|
||||
By default, the timer thread is used. When the following is defined, the timer expiration
|
||||
processing is done directly from the timer ISR, thereby eliminating the timer thread control
|
||||
block, stack, and context switching to activate it. */
|
||||
|
||||
/*
|
||||
#define TX_TIMER_PROCESS_IN_ISR
|
||||
*/
|
||||
|
||||
/* Determine if in-line timer reactivation should be used within the timer expiration processing.
|
||||
By default, this is disabled and a function call is used. When the following is defined,
|
||||
reactivating is performed in-line resulting in faster timer processing but slightly larger
|
||||
code size. */
|
||||
|
||||
/*
|
||||
#define TX_REACTIVATE_INLINE
|
||||
*/
|
||||
|
||||
/* Determine is stack filling is enabled. By default, ThreadX stack filling is enabled,
|
||||
which places an 0xEF pattern in each byte of each thread's stack. This is used by
|
||||
debuggers with ThreadX-awareness and by the ThreadX run-time stack checking feature. */
|
||||
|
||||
/*
|
||||
#define TX_DISABLE_STACK_FILLING
|
||||
*/
|
||||
|
||||
/* Determine whether or not stack checking is enabled. By default, ThreadX stack checking is
|
||||
disabled. When the following is defined, ThreadX thread stack checking is enabled. If stack
|
||||
checking is enabled (TX_ENABLE_STACK_CHECKING is defined), the TX_DISABLE_STACK_FILLING
|
||||
define is negated, thereby forcing the stack fill which is necessary for the stack checking
|
||||
logic. */
|
||||
|
||||
/*
|
||||
#define TX_ENABLE_STACK_CHECKING
|
||||
*/
|
||||
|
||||
/* Determine if preemption-threshold should be disabled. By default, preemption-threshold is
|
||||
enabled. If the application does not use preemption-threshold, it may be disabled to reduce
|
||||
code size and improve performance. */
|
||||
|
||||
/*
|
||||
#define TX_DISABLE_PREEMPTION_THRESHOLD
|
||||
*/
|
||||
|
||||
/* Determine if global ThreadX variables should be cleared. If the compiler startup code clears
|
||||
the .bss section prior to ThreadX running, the define can be used to eliminate unnecessary
|
||||
clearing of ThreadX global variables. */
|
||||
|
||||
/*
|
||||
#define TX_DISABLE_REDUNDANT_CLEARING
|
||||
*/
|
||||
|
||||
/* Determine if no timer processing is required. This option will help eliminate the timer
|
||||
processing when not needed. The user will also have to comment out the call to
|
||||
tx_timer_interrupt, which is typically made from assembly language in
|
||||
tx_initialize_low_level. Note: if TX_NO_TIMER is used, the define TX_TIMER_PROCESS_IN_ISR
|
||||
must also be used. */
|
||||
|
||||
/*
|
||||
#define TX_NO_TIMER
|
||||
#ifndef TX_TIMER_PROCESS_IN_ISR
|
||||
#define TX_TIMER_PROCESS_IN_ISR
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Determine if the notify callback option should be disabled. By default, notify callbacks are
|
||||
enabled. If the application does not use notify callbacks, they may be disabled to reduce
|
||||
code size and improve performance. */
|
||||
|
||||
/*
|
||||
#define TX_DISABLE_NOTIFY_CALLBACKS
|
||||
*/
|
||||
|
||||
|
||||
/* Determine if the tx_thread_resume and tx_thread_suspend services should have their internal
|
||||
code in-line. This results in a larger image, but improves the performance of the thread
|
||||
resume and suspend services. */
|
||||
|
||||
/*
|
||||
#define TX_INLINE_THREAD_RESUME_SUSPEND
|
||||
*/
|
||||
|
||||
|
||||
/* Determine if the internal ThreadX code is non-interruptable. This results in smaller code
|
||||
size and less processing overhead, but increases the interrupt lockout time. */
|
||||
|
||||
/*
|
||||
#define TX_NOT_INTERRUPTABLE
|
||||
*/
|
||||
|
||||
|
||||
/* Determine if the trace event logging code should be enabled. This causes slight increases in
|
||||
code size and overhead, but provides the ability to generate system trace information which
|
||||
is available for viewing in TraceX. */
|
||||
|
||||
/*
|
||||
#define TX_ENABLE_EVENT_TRACE
|
||||
*/
|
||||
|
||||
|
||||
/* Determine if block pool performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various block pool performance information. */
|
||||
|
||||
/*
|
||||
#define TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if byte pool performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various byte pool performance information. */
|
||||
|
||||
/*
|
||||
#define TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if event flags performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various event flags performance information. */
|
||||
|
||||
/*
|
||||
#define TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if mutex performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various mutex performance information. */
|
||||
|
||||
/*
|
||||
#define TX_MUTEX_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if queue performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various queue performance information. */
|
||||
|
||||
/*
|
||||
#define TX_QUEUE_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if semaphore performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various semaphore performance information. */
|
||||
|
||||
/*
|
||||
#define TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if thread performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various thread performance information. */
|
||||
|
||||
/*
|
||||
#define TX_THREAD_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
/* Determine if timer performance gathering is required by the application. When the following is
|
||||
defined, ThreadX gathers various timer performance information. */
|
||||
|
||||
/*
|
||||
#define TX_TIMER_ENABLE_PERFORMANCE_INFO
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user