#define TX_THREAD_STACK_CHECK(thread_ptr) \
{ \
TX_INTERRUPT_SAVE_AREA \
TX_DISABLE \
if (((thread_ptr)) && ((thread_ptr) -> tx_thread_id == TX_THREAD_ID)) \
{ \
if (((ULONG *) (thread_ptr) -> tx_thread_stack_ptr) < ((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr)) \
{ \
(thread_ptr) -> tx_thread_stack_highest_ptr = (thread_ptr) -> tx_thread_stack_ptr; \
} \
if ((*((ULONG *) (thread_ptr) -> tx_thread_stack_start) != TX_STACK_FILL) || \
(*((ULONG *) (((UCHAR *) (thread_ptr) -> tx_thread_stack_end) + 1)) != TX_STACK_FILL) || \
(((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr) < ((ULONG *) (thread_ptr) -> tx_thread_stack_start))) \
{ \
TX_RESTORE \
_tx_thread_stack_error_handler((thread_ptr)); \
TX_DISABLE \
} \
if (*(((ULONG *) (thread_ptr) -> tx_thread_stack_highest_ptr) - 1) != TX_STACK_FILL) \
{ \
TX_RESTORE \
_tx_thread_stack_analyze((thread_ptr)); \
TX_DISABLE \
} \
} \
TX_RESTORE \
}