/***************************************************************************
 * Copyright (C) 2026 Eclipse ThreadX contributors
 *
 * 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.
 *
 * AI Disclosure: This file was largely AI-generated by Codex (gpt 5.4).
 * The AI-generated portions may be considered public domain (CC0-1.0)
 * and not subject to the project's licence. The human contributor has
 * reviewed and verified that the code is correct.
 *
 * SPDX-License-Identifier: MIT and CC0-1.0
 **************************************************************************/

#ifndef TX_PORT_H
#define TX_PORT_H

/************* Define ThreadX SMP constants.  *************/

#define TX_DISABLE_INLINE

#ifndef TX_THREAD_SMP_MAX_CORES
#define TX_THREAD_SMP_MAX_CORES                 4
#endif

#ifndef TX_THREAD_SMP_CORE_MASK
#define TX_THREAD_SMP_CORE_MASK                 0xFU
#endif

#define TX_PORT_SPECIFIC_PRE_INITIALIZATION
#define TX_THREAD_SMP_INTER_CORE_INTERRUPT
#define TX_THREAD_SMP_DEFAULT_WAKEUP_LOGIC

#ifdef TX_THREAD_SMP_WAKEUP_LOGIC
#include "tx_thread_smp_core_wakeup.h"
#else
#ifdef TX_THREAD_SMP_DEFAULT_WAKEUP_LOGIC
#define TX_THREAD_SMP_WAKEUP_LOGIC
#define TX_THREAD_SMP_WAKEUP(i)                _tx_thread_smp_core_preempt(i)
#endif
#endif

#ifdef TX_INLINE_THREAD_RESUME_SUSPEND
#undef TX_INLINE_THREAD_RESUME_SUSPEND
#endif

#define INLINE_DECLARE  __inline

/************* End ThreadX SMP constants.  *************/


#ifdef TX_INCLUDE_USER_DEFINE_FILE
#include "tx_user.h"
#endif


#define VOID                                    void
typedef char                                    CHAR;
typedef unsigned char                           UCHAR;
typedef int                                     INT;
typedef unsigned int                            UINT;
typedef long                                    LONG;
typedef unsigned long                           ULONG;
typedef short                                   SHORT;
typedef unsigned short                          USHORT;
typedef unsigned long long                      ULONG64;
#define ULONG64_DEFINED

#define ALIGN_TYPE_DEFINED
typedef unsigned long long                      ALIGN_TYPE;

#define TX_BYTE_BLOCK_FREE                      ((ALIGN_TYPE) 0xFFFFEEEEFFFFEEEEULL)


#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#ifndef __GNUC__
#ifndef __attribute__
#define __attribute__(a)
#endif
#endif

typedef unsigned int    TEST_FLAG;
extern TEST_FLAG        threadx_byte_allocate_loop_test;
extern TEST_FLAG        threadx_byte_release_loop_test;
extern TEST_FLAG        threadx_mutex_suspension_put_test;
extern TEST_FLAG        threadx_mutex_suspension_priority_test;
#ifndef TX_TIMER_PROCESS_IN_ISR
extern TEST_FLAG        threadx_delete_timer_thread;
#endif
extern void             abort_and_resume_byte_allocating_thread(void);
extern void             abort_all_threads_suspended_on_mutex(void);
extern void             suspend_lowest_priority(void);
#ifndef TX_TIMER_PROCESS_IN_ISR
extern void             delete_timer_thread(void);
#endif
extern TEST_FLAG        test_stack_analyze_flag;
extern TEST_FLAG        test_initialize_flag;
extern TEST_FLAG        test_forced_mutex_timeout;
extern UINT             mutex_priority_change_extension_selection;
extern UINT             priority_change_extension_selection;

#ifdef TX_REGRESSION_TEST

#define TX_PORT_SPECIFIC_MEMORY_SYNCHRONIZATION other_core_status =  other_core_status + _tx_thread_system_state[0]; \
                                                _tx_thread_system_state[0] =  0;

#define TX_BYTE_ALLOCATE_EXTENSION              if (threadx_byte_allocate_loop_test == ((TEST_FLAG) 1))         \
                                                {                                                               \
                                                    pool_ptr -> tx_byte_pool_owner =  TX_NULL;                  \
                                                    threadx_byte_allocate_loop_test = ((TEST_FLAG) 0);          \
                                                }

#define TX_BYTE_RELEASE_EXTENSION               if (threadx_byte_release_loop_test == ((TEST_FLAG) 1))          \
                                                {                                                               \
                                                    threadx_byte_release_loop_test = ((TEST_FLAG) 0);           \
                                                    abort_and_resume_byte_allocating_thread();                  \
                                                }

#define TX_MUTEX_PUT_EXTENSION_1                if (threadx_mutex_suspension_put_test == ((TEST_FLAG) 1))       \
                                                {                                                               \
                                                    threadx_mutex_suspension_put_test = ((TEST_FLAG) 0);        \
                                                    abort_all_threads_suspended_on_mutex();                     \
                                                }

#define TX_MUTEX_PUT_EXTENSION_2                if (test_forced_mutex_timeout == ((TEST_FLAG) 1))               \
                                                {                                                               \
                                                    test_forced_mutex_timeout = ((TEST_FLAG) 0);                \
                                                    _tx_thread_wait_abort(mutex_ptr -> tx_mutex_suspension_list); \
                                                }

#define TX_MUTEX_PRIORITY_CHANGE_EXTENSION      if (threadx_mutex_suspension_priority_test == ((TEST_FLAG) 1))  \
                                                {                                                               \
                                                    threadx_mutex_suspension_priority_test = ((TEST_FLAG) 0);   \
                                                    if (mutex_priority_change_extension_selection == 2U)        \
                                                        original_priority = new_priority;                       \
                                                    if (mutex_priority_change_extension_selection == 3U)        \
                                                        original_pt_thread =  thread_ptr;                       \
                                                    if (mutex_priority_change_extension_selection == 4U)        \
                                                    {                                                           \
                                                        execute_ptr =  thread_ptr;                              \
                                                        _tx_thread_preemption__threshold_scheduled = TX_NULL;   \
                                                    }                                                           \
                                                    suspend_lowest_priority();                                  \
                                                }

#define TX_THREAD_PRIORITY_CHANGE_EXTENSION     if (priority_change_extension_selection != ((TEST_FLAG) 0))     \
                                                {                                                               \
                                                    if (priority_change_extension_selection == 1U)              \
                                                        thread_ptr -> tx_thread_smp_core_mapped =  TX_THREAD_SMP_MAX_CORES; \
                                                    else if (priority_change_extension_selection == 2U)         \
                                                    {                                                           \
                                                        original_priority =  new_priority;                      \
                                                        _tx_thread_execute_ptr[0] =  TX_NULL;                   \
                                                    }                                                           \
                                                    else if (priority_change_extension_selection == 3U)         \
                                                    {                                                           \
                                                        original_pt_thread =  thread_ptr;                       \
                                                    }                                                           \
                                                    else                                                        \
                                                    {                                                           \
                                                        _tx_thread_preemption__threshold_scheduled = TX_NULL;   \
                                                    }                                                           \
                                                    priority_change_extension_selection =  0;                   \
                                                }

#ifndef TX_TIMER_PROCESS_IN_ISR
#define TX_TIMER_INITIALIZE_EXTENSION(a)        if (threadx_delete_timer_thread == ((TEST_FLAG) 1))             \
                                                {                                                               \
                                                    threadx_delete_timer_thread = ((TEST_FLAG) 0);              \
                                                    delete_timer_thread();                                      \
                                                    (a) =  ((UINT) 1);                                          \
                                                }
#endif

#define TX_THREAD_STACK_ANALYZE_EXTENSION       if (test_stack_analyze_flag == ((TEST_FLAG) 1))                 \
                                                {                                                               \
                                                    thread_ptr -> tx_thread_id =  ((TEST_FLAG) 0);              \
                                                    test_stack_analyze_flag =     ((TEST_FLAG) 0);              \
                                                }                                                               \
                                                else if (test_stack_analyze_flag == ((TEST_FLAG) 2))            \
                                                {                                                               \
                                                    stack_ptr =  thread_ptr -> tx_thread_stack_start;           \
                                                    test_stack_analyze_flag =     ((TEST_FLAG) 0);              \
                                                }                                                               \
                                                else if (test_stack_analyze_flag == ((TEST_FLAG) 3))            \
                                                {                                                               \
                                                    *stack_ptr =  TX_STACK_FILL;                                \
                                                    test_stack_analyze_flag =     ((TEST_FLAG) 0);              \
                                                }                                                               \
                                                else                                                            \
                                                {                                                               \
                                                    test_stack_analyze_flag =     ((TEST_FLAG) 0);              \
                                                }

#define TX_INITIALIZE_KERNEL_ENTER_EXTENSION    if (test_initialize_flag == ((TEST_FLAG) 1))                    \
                                                {                                                               \
                                                    test_initialize_flag =  ((TEST_FLAG) 0);                    \
                                                    return;                                                     \
                                                }

#endif


void    _tx_win32_debug_entry_insert(char *action, char *file, unsigned long line);

#ifndef TX_WIN32_DEBUG_ENABLE
#define _tx_win32_debug_entry_insert(a, b, c)
#endif


#ifndef TX_MISRA_ENABLE
#define TX_MEMSET(a,b,c)                        {                                       \
                                                UCHAR *ptr;                             \
                                                UCHAR value;                            \
                                                UINT  i, size;                          \
                                                    ptr =    (UCHAR *) ((VOID *) a);    \
                                                    value =  (UCHAR) b;                 \
                                                    size =   (UINT) c;                  \
                                                    for (i = 0; i < size; i++)          \
                                                    {                                   \
                                                        *ptr++ =  value;                \
                                                    }                                   \
                                                }
#endif


#include <windows.h>

#ifndef TX_WIN32_USE_ADDRESS_WAIT
#define TX_WIN32_USE_ADDRESS_WAIT               1
#endif

#ifndef TX_WIN32_USE_HIGH_RESOLUTION_TIMER
#define TX_WIN32_USE_HIGH_RESOLUTION_TIMER      1
#endif

#ifndef CREATE_WAITABLE_TIMER_HIGH_RESOLUTION
#define CREATE_WAITABLE_TIMER_HIGH_RESOLUTION   0x00000002UL
#endif


#ifndef TX_MAX_PRIORITIES
#define TX_MAX_PRIORITIES                       32
#endif

#ifndef TX_MINIMUM_STACK
#define TX_MINIMUM_STACK                        200
#endif

#ifndef TX_TIMER_THREAD_STACK_SIZE
#define TX_TIMER_THREAD_STACK_SIZE              400
#endif

#ifndef TX_TIMER_THREAD_PRIORITY
#define TX_TIMER_THREAD_PRIORITY                0
#endif

#define TX_INT_DISABLE                          1
#define TX_INT_ENABLE                           0

#ifndef TX_TRACE_TIME_SOURCE
#define TX_TRACE_TIME_SOURCE                    ((ULONG) (_tx_win32_time_stamp.LowPart))
#endif

#ifndef TX_TRACE_TIME_MASK
#define TX_TRACE_TIME_MASK                      0xFFFFFFFFUL
#endif

#define TX_TRACE_PORT_EXTENSION                 QueryPerformanceCounter((LARGE_INTEGER *)&_tx_win32_time_stamp);
#define TX_PORT_SPECIFIC_BUILD_OPTIONS          0

#ifdef TX_MISRA_ENABLE
#define TX_DISABLE_INLINE
#else
#define TX_INLINE_INITIALIZATION
#endif

void    _tx_initialize_start_interrupts(void);

#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION                       _tx_initialize_start_interrupts();                  \
                                                                            {                                                   \
                                                                            UINT k;                                             \
                                                                                for (k = 1U; k < TX_THREAD_SMP_MAX_CORES; k++)  \
                                                                                {                                               \
                                                                                    _tx_thread_system_state[k] =  0;            \
                                                                                }                                               \
                                                                            }

#ifdef TX_WIN32_PROFILE_ENABLE
#define TX_WIN32_PROFILE_THREAD_EXTENSION                                   ULONG64 tx_thread_win32_profile_run_signal_ticks; \
                                                                            ULONG64 tx_thread_win32_profile_run_wake_ticks;
#else
#define TX_WIN32_PROFILE_THREAD_EXTENSION
#endif

#ifndef TX_MISRA_ENABLE
#ifdef TX_ENABLE_STACK_CHECKING
#undef TX_DISABLE_STACK_FILLING
#endif
#endif


#define TX_THREAD_EXTENSION_0                                               HANDLE tx_thread_win32_thread_handle; \
                                                                            DWORD  tx_thread_win32_thread_id; \
                                                                            HANDLE tx_thread_win32_thread_run_semaphore; \
                                                                            HANDLE tx_thread_win32_thread_start_semaphore; \
                                                                            LONG   tx_thread_win32_run_sequence; \
                                                                            LONG   tx_thread_win32_run_sequence_seen; \
                                                                            LONG   tx_thread_win32_start_sequence; \
                                                                            UINT   tx_thread_win32_suspension_type; \
                                                                            UINT   tx_thread_win32_mutex_access; \
                                                                            UINT   tx_thread_win32_int_disabled_flag; \
                                                                            UINT   tx_thread_win32_deferred_preempt; \
                                                                            UINT   tx_thread_win32_virtual_core; \
                                                                            TX_WIN32_PROFILE_THREAD_EXTENSION
#define TX_THREAD_EXTENSION_1
#define TX_THREAD_EXTENSION_2
#define TX_THREAD_EXTENSION_3

#define TX_BLOCK_POOL_EXTENSION
#define TX_BYTE_POOL_EXTENSION
#define TX_EVENT_FLAGS_GROUP_EXTENSION
#define TX_MUTEX_EXTENSION
#define TX_QUEUE_EXTENSION
#define TX_SEMAPHORE_EXTENSION
#define TX_TIMER_EXTENSION

#ifndef TX_THREAD_USER_EXTENSION
#define TX_THREAD_USER_EXTENSION
#endif

#define TX_THREAD_CREATE_EXTENSION(thread_ptr)
#define TX_THREAD_DELETE_EXTENSION(thread_ptr)
#define TX_THREAD_COMPLETED_EXTENSION(thread_ptr)
#define TX_THREAD_TERMINATED_EXTENSION(thread_ptr)

#define TX_BLOCK_POOL_CREATE_EXTENSION(pool_ptr)
#define TX_BYTE_POOL_CREATE_EXTENSION(pool_ptr)
#define TX_EVENT_FLAGS_GROUP_CREATE_EXTENSION(group_ptr)
#define TX_MUTEX_CREATE_EXTENSION(mutex_ptr)
#define TX_QUEUE_CREATE_EXTENSION(queue_ptr)
#define TX_SEMAPHORE_CREATE_EXTENSION(semaphore_ptr)
#define TX_TIMER_CREATE_EXTENSION(timer_ptr)


#define TX_TIMER_INTERNAL_EXTENSION             VOID    *tx_timer_internal_extension_ptr;

#define TX_THREAD_CREATE_TIMEOUT_SETUP(t)       (t) -> tx_thread_timer.tx_timer_internal_timeout_function =  &(_tx_thread_timeout);            \
                                                (t) -> tx_thread_timer.tx_timer_internal_timeout_param =     0;                                \
                                                (t) -> tx_thread_timer.tx_timer_internal_extension_ptr =     (VOID *) (t);

#define TX_THREAD_TIMEOUT_POINTER_SETUP(t)      (t) =  (TX_THREAD *) _tx_timer_expired_timer_ptr -> tx_timer_internal_extension_ptr;


struct TX_THREAD_STRUCT;

typedef struct TX_WIN32_CRITICAL_SECTION_STRUCT
{
    HANDLE                                      tx_win32_critical_section_mutex_handle;
    DWORD                                       tx_win32_critical_section_owner;
    ULONG                                       tx_win32_critical_section_nested_count;
} TX_WIN32_CRITICAL_SECTION;

void  _tx_win32_critical_section_obtain(TX_WIN32_CRITICAL_SECTION *critical_section);
void  _tx_win32_critical_section_release(TX_WIN32_CRITICAL_SECTION *critical_section);
void  _tx_win32_critical_section_release_all(TX_WIN32_CRITICAL_SECTION *critical_section);

typedef struct TX_THREAD_STRUCT TX_THREAD;

void  _tx_thread_delete_port_completion(TX_THREAD *thread_ptr, UINT tx_interrupt_save);
#define TX_THREAD_DELETE_PORT_COMPLETION(thread_ptr) _tx_thread_delete_port_completion(thread_ptr, tx_interrupt_save);

void  _tx_thread_reset_port_completion(TX_THREAD *thread_ptr, UINT tx_interrupt_save);
#define TX_THREAD_RESET_PORT_COMPLETION(thread_ptr) _tx_thread_reset_port_completion(thread_ptr, tx_interrupt_save);


typedef struct TX_THREAD_SMP_PROTECT_STRUCT
{
    ULONG                   tx_thread_smp_protect_in_force;
    struct TX_THREAD_STRUCT *tx_thread_smp_protect_thread;
    ULONG                   tx_thread_smp_protect_core;
    ULONG                   tx_thread_smp_protect_count;
    DWORD                   tx_thread_smp_protect_thread_id;
} TX_THREAD_SMP_PROTECT;

typedef struct TX_THREAD_SMP_CORE_MAPPING_STRUCT
{
    HANDLE                  tx_thread_smp_core_mapping_thread_handle;
    DWORD                   tx_thread_smp_core_mapping_thread_id;
    struct TX_THREAD_STRUCT *tx_thread_smp_core_mapping_thread;
} TX_THREAD_SMP_CORE_MAPPING;

struct TX_THREAD_STRUCT *   _tx_thread_smp_current_thread_get(void);
UINT                        _tx_thread_smp_core_get(void);
void                        _tx_thread_smp_core_preempt(UINT core);
UINT                        _tx_thread_smp_protect(void);
void                        _tx_thread_smp_unprotect(UINT interrupt_save);
ULONG                       _tx_thread_smp_current_state_get(void);
ULONG                       _tx_thread_smp_time_get(void);
void                        _tx_thread_smp_low_level_initialize(UINT number_of_cores);
void                        _tx_thread_smp_initialize_wait(void);

#ifdef TX_THREAD_SMP_DEBUG_ENABLE
void                        _tx_thread_smp_debug_entry_insert(ULONG id, ULONG suspend, VOID *thread_ptr);
#else
#define                     _tx_thread_smp_debug_entry_insert(a, b, c)
#endif

#define TX_SMP_CORE_ID                          _tx_thread_smp_core_get()


#define TX_BLOCK_POOL_DELETE_EXTENSION(pool_ptr)
#define TX_BYTE_POOL_DELETE_EXTENSION(pool_ptr)
#define TX_EVENT_FLAGS_GROUP_DELETE_EXTENSION(group_ptr)
#define TX_MUTEX_DELETE_EXTENSION(mutex_ptr)
#define TX_QUEUE_DELETE_EXTENSION(queue_ptr)
#define TX_SEMAPHORE_DELETE_EXTENSION(semaphore_ptr)
#define TX_TIMER_DELETE_EXTENSION(timer_ptr)


UINT   _tx_thread_interrupt_disable(void);
VOID   _tx_thread_interrupt_restore(UINT previous_posture);
UINT   _tx_thread_interrupt_control(UINT new_posture);

#define TX_INTERRUPT_SAVE_AREA                  UINT tx_interrupt_save;
#define TX_DISABLE                              tx_interrupt_save =  _tx_thread_smp_protect();
#define TX_RESTORE                              _tx_thread_smp_unprotect(tx_interrupt_save);


#define TX_BLOCK_POOL_DISABLE                   TX_DISABLE
#define TX_BYTE_POOL_DISABLE                    TX_DISABLE
#define TX_EVENT_FLAGS_GROUP_DISABLE            TX_DISABLE
#define TX_MUTEX_DISABLE                        TX_DISABLE
#define TX_QUEUE_DISABLE                        TX_DISABLE
#define TX_SEMAPHORE_DISABLE                    TX_DISABLE


#ifdef TX_THREAD_INIT
CHAR                            _tx_version_id[] =
                                    "(c) 2026 Eclipse ThreadX contributors.  *  ThreadX SMP/Win64/MSVC Version 6.5.1.202602a *";
#else
extern  CHAR                    _tx_version_id[];
#endif


extern TX_WIN32_CRITICAL_SECTION                _tx_win32_critical_section;
extern HANDLE                                   _tx_win32_scheduler_event;
extern DWORD                                    _tx_win32_scheduler_id;
extern ULONG                                    _tx_win32_global_int_disabled_flag;
extern LARGE_INTEGER                            _tx_win32_time_stamp;
extern ULONG                                    _tx_win32_system_error;
extern HANDLE                                   _tx_win32_timer_handle;
extern HANDLE                                   _tx_win32_timer_thread_handle;
extern DWORD                                    _tx_win32_timer_thread_id;
extern HANDLE                                   _tx_win32_isr_semaphore;
extern UINT                                     _tx_win32_timer_waiting;
extern TX_THREAD_SMP_CORE_MAPPING               _tx_win32_virtual_cores[TX_THREAD_SMP_MAX_CORES];
extern __declspec(thread) int                   _tx_win32_threadx_thread;
extern __declspec(thread) UINT                  _tx_win32_current_virtual_core;

UINT   _tx_win32_smp_current_core_get(void);
void   _tx_win32_thread_suspend(HANDLE thread_handle);
void   _tx_win32_thread_resume(HANDLE thread_handle);
void   _tx_win32_thread_sleep(ULONG milliseconds);
void   _tx_win32_thread_yield(void);
void   _tx_win32_semaphore_reset(HANDLE semaphore_handle);
LONG   _tx_win32_thread_start_sequence_get(TX_THREAD *thread_ptr);
void   _tx_win32_thread_run_signal(TX_THREAD *thread_ptr);
DWORD  _tx_win32_wait_for_thread_run(TX_THREAD *thread_ptr);
void   _tx_win32_thread_start_ack_signal(TX_THREAD *thread_ptr);
DWORD  _tx_win32_wait_for_scheduler_event(void);
DWORD  _tx_win32_wait_for_thread_run_semaphore(HANDLE semaphore_handle);
DWORD  _tx_win32_wait_for_thread_start_semaphore(HANDLE semaphore_handle);
DWORD  _tx_win32_wait_for_thread_start_ack(TX_THREAD *thread_ptr, LONG start_sequence);
DWORD  _tx_win32_wait_for_isr_semaphore(void);
DWORD  _tx_win32_wait_for_isr_rendezvous(void);
DWORD  _tx_win32_wait_for_timer_object(void);
#ifdef TX_WIN32_PROFILE_ENABLE
void   _tx_win32_profile_reset(void);
void   _tx_win32_profile_report(CHAR *label);
void   _tx_win32_profile_mark_run_signal(TX_THREAD *thread_ptr);
void   _tx_win32_profile_mark_run_wake(TX_THREAD *thread_ptr);
void   _tx_win32_profile_mark_start_ack(TX_THREAD *thread_ptr);
#endif

#ifndef TX_WIN32_MEMORY_SIZE
#define TX_WIN32_MEMORY_SIZE                    100000
#endif

#ifndef TX_TIMER_TICKS_PER_SECOND
#define TX_TIMER_TICKS_PER_SECOND               100UL
#endif

#ifndef TX_WIN32_THREAD_STACK_SIZE
#define TX_WIN32_THREAD_STACK_SIZE              65536
#endif

#ifndef TX_TIMER_PERIODIC
#ifdef TX_WIN32_SLOW_TIMER
#define TX_TIMER_PERIODIC                       TX_WIN32_SLOW_TIMER
#else
#define TX_TIMER_PERIODIC                       10
#endif
#endif

#ifndef TX_WIN32_ISR_PERIODIC
#if defined(CTEST) || defined(BATCH_TEST)
#define TX_WIN32_ISR_PERIODIC                   1
#else
#define TX_WIN32_ISR_PERIODIC                   TX_TIMER_PERIODIC
#endif
#endif

#if (TX_WIN32_ISR_PERIODIC > TX_TIMER_PERIODIC)
#error "TX_WIN32_ISR_PERIODIC must not exceed TX_TIMER_PERIODIC"
#endif

#if ((TX_TIMER_PERIODIC % TX_WIN32_ISR_PERIODIC) != 0)
#error "TX_TIMER_PERIODIC must be an integer multiple of TX_WIN32_ISR_PERIODIC"
#endif

#define TX_WIN32_TIMER_INTERRUPTS_PER_TICK      (TX_TIMER_PERIODIC / TX_WIN32_ISR_PERIODIC)

#define TX_WIN32_PRIORITY_SCHEDULE              THREAD_PRIORITY_NORMAL
#define TX_WIN32_PRIORITY_ISR                   THREAD_PRIORITY_HIGHEST
#define TX_WIN32_PRIORITY_USER_THREAD           THREAD_PRIORITY_LOWEST

#endif
