updated to 6.0.1 and added additional processors/toolchains
This commit is contained in:
46
ports/win32/vs_2019/example_build/azure_rtos.sln
Normal file
46
ports/win32/vs_2019/example_build/azure_rtos.sln
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30204.135
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_threadx", "sample_threadx\sample_threadx.vcxproj", "{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tx", "tx\tx.vcxproj", "{51907112-62DA-98D6-7897-5A2FD48B99C3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Template|Win32 = Template|Win32
|
||||
Template|x64 = Template|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Release|Win32.Build.0 = Release|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Release|x64.ActiveCfg = Release|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Template|Win32.Build.0 = Release|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Template|x64.ActiveCfg = Release|Win32
|
||||
{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}.Template|x64.Build.0 = Release|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Release|Win32.Build.0 = Release|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Template|Win32.ActiveCfg = Template|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Template|Win32.Build.0 = Template|Win32
|
||||
{51907112-62DA-98D6-7897-5A2FD48B99C3}.Template|x64.ActiveCfg = Template|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FAE0BBF6-14F8-4320-AAB9-65E1361EB38A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,381 @@
|
||||
/* This is a small demo of the high-performance ThreadX kernel. It includes examples of eight
|
||||
threads of different priorities, using a message queue, semaphore, mutex, event flags group,
|
||||
byte pool, and block pool. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define DEMO_STACK_SIZE 1024
|
||||
#define DEMO_BYTE_POOL_SIZE 9120
|
||||
#define DEMO_BLOCK_POOL_SIZE 100
|
||||
#define DEMO_QUEUE_SIZE 100
|
||||
|
||||
|
||||
/* Define the ThreadX object control blocks... */
|
||||
|
||||
TX_THREAD thread_0;
|
||||
TX_THREAD thread_1;
|
||||
TX_THREAD thread_2;
|
||||
TX_THREAD thread_3;
|
||||
TX_THREAD thread_4;
|
||||
TX_THREAD thread_5;
|
||||
TX_THREAD thread_6;
|
||||
TX_THREAD thread_7;
|
||||
TX_QUEUE queue_0;
|
||||
TX_SEMAPHORE semaphore_0;
|
||||
TX_MUTEX mutex_0;
|
||||
TX_EVENT_FLAGS_GROUP event_flags_0;
|
||||
TX_BYTE_POOL byte_pool_0;
|
||||
TX_BLOCK_POOL block_pool_0;
|
||||
|
||||
|
||||
/* Define the counters used in the demo application... */
|
||||
|
||||
ULONG thread_0_counter;
|
||||
ULONG thread_1_counter;
|
||||
ULONG thread_1_messages_sent;
|
||||
ULONG thread_2_counter;
|
||||
ULONG thread_2_messages_received;
|
||||
ULONG thread_3_counter;
|
||||
ULONG thread_4_counter;
|
||||
ULONG thread_5_counter;
|
||||
ULONG thread_6_counter;
|
||||
ULONG thread_7_counter;
|
||||
|
||||
|
||||
/* Define thread prototypes. */
|
||||
|
||||
void thread_0_entry(ULONG thread_input);
|
||||
void thread_1_entry(ULONG thread_input);
|
||||
void thread_2_entry(ULONG thread_input);
|
||||
void thread_3_and_4_entry(ULONG thread_input);
|
||||
void thread_5_entry(ULONG thread_input);
|
||||
void thread_6_and_7_entry(ULONG thread_input);
|
||||
|
||||
|
||||
/* Define main entry point. */
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
/* Enter the ThreadX kernel. */
|
||||
tx_kernel_enter();
|
||||
}
|
||||
|
||||
|
||||
/* Define what the initial system looks like. */
|
||||
|
||||
void tx_application_define(void *first_unused_memory)
|
||||
{
|
||||
|
||||
CHAR *pointer = TX_NULL;
|
||||
|
||||
|
||||
/* Create a byte memory pool from which to allocate the thread stacks. */
|
||||
tx_byte_pool_create(&byte_pool_0, "byte pool 0", first_unused_memory, DEMO_BYTE_POOL_SIZE);
|
||||
|
||||
/* Put system definition stuff in here, e.g. thread creates and other assorted
|
||||
create information. */
|
||||
|
||||
/* Allocate the stack for thread 0. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
/* Create the main thread. */
|
||||
tx_thread_create(&thread_0, "thread 0", thread_0_entry, 0,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
|
||||
|
||||
/* Allocate the stack for thread 1. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
/* Create threads 1 and 2. These threads pass information through a ThreadX
|
||||
message queue. It is also interesting to note that these threads have a time
|
||||
slice. */
|
||||
tx_thread_create(&thread_1, "thread 1", thread_1_entry, 1,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
16, 16, 4, TX_AUTO_START);
|
||||
|
||||
/* Allocate the stack for thread 2. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
tx_thread_create(&thread_2, "thread 2", thread_2_entry, 2,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
16, 16, 4, TX_AUTO_START);
|
||||
|
||||
/* Allocate the stack for thread 3. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
/* Create threads 3 and 4. These threads compete for a ThreadX counting semaphore.
|
||||
An interesting thing here is that both threads share the same instruction area. */
|
||||
tx_thread_create(&thread_3, "thread 3", thread_3_and_4_entry, 3,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
|
||||
/* Allocate the stack for thread 4. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
tx_thread_create(&thread_4, "thread 4", thread_3_and_4_entry, 4,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
|
||||
/* Allocate the stack for thread 5. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
/* Create thread 5. This thread simply pends on an event flag which will be set
|
||||
by thread_0. */
|
||||
tx_thread_create(&thread_5, "thread 5", thread_5_entry, 5,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
4, 4, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
|
||||
/* Allocate the stack for thread 6. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
/* Create threads 6 and 7. These threads compete for a ThreadX mutex. */
|
||||
tx_thread_create(&thread_6, "thread 6", thread_6_and_7_entry, 6,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
|
||||
/* Allocate the stack for thread 7. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_STACK_SIZE, TX_NO_WAIT);
|
||||
|
||||
tx_thread_create(&thread_7, "thread 7", thread_6_and_7_entry, 7,
|
||||
pointer, DEMO_STACK_SIZE,
|
||||
8, 8, TX_NO_TIME_SLICE, TX_AUTO_START);
|
||||
|
||||
/* Allocate the message queue. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_QUEUE_SIZE*sizeof(ULONG), TX_NO_WAIT);
|
||||
|
||||
/* Create the message queue shared by threads 1 and 2. */
|
||||
tx_queue_create(&queue_0, "queue 0", TX_1_ULONG, pointer, DEMO_QUEUE_SIZE*sizeof(ULONG));
|
||||
|
||||
/* Create the semaphore used by threads 3 and 4. */
|
||||
tx_semaphore_create(&semaphore_0, "semaphore 0", 1);
|
||||
|
||||
/* Create the event flags group used by threads 1 and 5. */
|
||||
tx_event_flags_create(&event_flags_0, "event flags 0");
|
||||
|
||||
/* Create the mutex used by thread 6 and 7 without priority inheritance. */
|
||||
tx_mutex_create(&mutex_0, "mutex 0", TX_NO_INHERIT);
|
||||
|
||||
/* Allocate the memory for a small block pool. */
|
||||
tx_byte_allocate(&byte_pool_0, (VOID **) &pointer, DEMO_BLOCK_POOL_SIZE, TX_NO_WAIT);
|
||||
|
||||
/* Create a block memory pool to allocate a message buffer from. */
|
||||
tx_block_pool_create(&block_pool_0, "block pool 0", sizeof(ULONG), pointer, DEMO_BLOCK_POOL_SIZE);
|
||||
|
||||
/* Allocate a block and release the block memory. */
|
||||
tx_block_allocate(&block_pool_0, (VOID **) &pointer, TX_NO_WAIT);
|
||||
|
||||
/* Release the block back to the pool. */
|
||||
tx_block_release(pointer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Define the test threads. */
|
||||
|
||||
void thread_0_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This thread simply sits in while-forever-sleep loop. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_0_counter++;
|
||||
|
||||
/* Print results. */
|
||||
printf("**** ThreadX Win32 Demonstration **** (c) 1996-2020 Microsoft Corporation\n\n");
|
||||
printf(" thread 0 events sent: %lu\n", thread_0_counter);
|
||||
printf(" thread 1 messages sent: %lu\n", thread_1_counter);
|
||||
printf(" thread 2 messages received: %lu\n", thread_2_counter);
|
||||
printf(" thread 3 obtained semaphore: %lu\n", thread_3_counter);
|
||||
printf(" thread 4 obtained semaphore: %lu\n", thread_4_counter);
|
||||
printf(" thread 5 events received: %lu\n", thread_5_counter);
|
||||
printf(" thread 6 mutex obtained: %lu\n", thread_6_counter);
|
||||
printf(" thread 7 mutex obtained: %lu\n\n", thread_7_counter);
|
||||
|
||||
/* Sleep for 10 ticks. */
|
||||
tx_thread_sleep(10);
|
||||
|
||||
/* Set event flag 0 to wakeup thread 5. */
|
||||
status = tx_event_flags_set(&event_flags_0, 0x1, TX_OR);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_1_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This thread simply sends messages to a queue shared by thread 2. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_1_counter++;
|
||||
|
||||
/* Send message to queue 0. */
|
||||
status = tx_queue_send(&queue_0, &thread_1_messages_sent, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check completion status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Increment the message sent. */
|
||||
thread_1_messages_sent++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_2_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
ULONG received_message;
|
||||
UINT status;
|
||||
|
||||
/* This thread retrieves messages placed on the queue by thread 1. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_2_counter++;
|
||||
|
||||
/* Retrieve a message from the queue. */
|
||||
status = tx_queue_receive(&queue_0, &received_message, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check completion status and make sure the message is what we
|
||||
expected. */
|
||||
if ((status != TX_SUCCESS) || (received_message != thread_2_messages_received))
|
||||
break;
|
||||
|
||||
/* Otherwise, all is okay. Increment the received message count. */
|
||||
thread_2_messages_received++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_3_and_4_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This function is executed from thread 3 and thread 4. As the loop
|
||||
below shows, these function compete for ownership of semaphore_0. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
if (thread_input == 3)
|
||||
thread_3_counter++;
|
||||
else
|
||||
thread_4_counter++;
|
||||
|
||||
/* Get the semaphore with suspension. */
|
||||
status = tx_semaphore_get(&semaphore_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Sleep for 2 ticks to hold the semaphore. */
|
||||
tx_thread_sleep(2);
|
||||
|
||||
/* Release the semaphore. */
|
||||
status = tx_semaphore_put(&semaphore_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_5_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
ULONG actual_flags;
|
||||
|
||||
|
||||
/* This thread simply waits for an event in a forever loop. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
thread_5_counter++;
|
||||
|
||||
/* Wait for event flag 0. */
|
||||
status = tx_event_flags_get(&event_flags_0, 0x1, TX_OR_CLEAR,
|
||||
&actual_flags, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if ((status != TX_SUCCESS) || (actual_flags != 0x1))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_6_and_7_entry(ULONG thread_input)
|
||||
{
|
||||
|
||||
UINT status;
|
||||
|
||||
|
||||
/* This function is executed from thread 6 and thread 7. As the loop
|
||||
below shows, these function compete for ownership of mutex_0. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Increment the thread counter. */
|
||||
if (thread_input == 6)
|
||||
thread_6_counter++;
|
||||
else
|
||||
thread_7_counter++;
|
||||
|
||||
/* Get the mutex with suspension. */
|
||||
status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Get the mutex again with suspension. This shows
|
||||
that an owning thread may retrieve the mutex it
|
||||
owns multiple times. */
|
||||
status = tx_mutex_get(&mutex_0, TX_WAIT_FOREVER);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Sleep for 2 ticks to hold the mutex. */
|
||||
tx_thread_sleep(2);
|
||||
|
||||
/* Release the mutex. */
|
||||
status = tx_mutex_put(&mutex_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
|
||||
/* Release the mutex again. This will actually
|
||||
release ownership since it was obtained twice. */
|
||||
status = tx_mutex_put(&mutex_0);
|
||||
|
||||
/* Check status. */
|
||||
if (status != TX_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<ProjectGuid>{7342DEEF-AB3F-00D5-9EDB-2829CD277B76}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>.\Debug\</OutDir>
|
||||
<IntDir>.\Debug\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>.\Release\</OutDir>
|
||||
<IntDir>.\Release\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
|
||||
<PrecompiledHeaderOutputFile>.\Debug\sample_threadx.pch</PrecompiledHeaderOutputFile>
|
||||
<ObjectFileName>.\Debug\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<AdditionalIncludeDirectories>..\..\inc;..\..\..\..\..\common\inc</AdditionalIncludeDirectories>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug\sample_threadx.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug\sample_threadx.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OutputFile>.\Debug\sample_threadx.exe</OutputFile>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<StringPooling>true</StringPooling>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerListingLocation>.\Release\</AssemblerListingLocation>
|
||||
<PrecompiledHeaderOutputFile>.\Release\sample_threadx.pch</PrecompiledHeaderOutputFile>
|
||||
<ObjectFileName>.\Release\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
|
||||
<AdditionalIncludeDirectories>../../../generic</AdditionalIncludeDirectories>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Release\sample_threadx.tlb</TypeLibraryName>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\sample_threadx.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Link>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OutputFile>.\Release\sample_threadx.exe</OutputFile>
|
||||
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_api.h" />
|
||||
<ClInclude Include="..\..\inc\tx_port.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="sample_threadx.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\tx\Debug\tx.lib" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="inc">
|
||||
<UniqueIdentifier>{6006269e-f4d4-4e46-be11-4a87e3703f4b}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{92d04b48-db8b-4511-a4fd-305688bda3d5}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\inc\tx_port.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_api.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="sample_threadx.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\tx\Debug\tx.lib" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
339
ports/win32/vs_2019/example_build/tx/tx.vcxproj
Normal file
339
ports/win32/vs_2019/example_build/tx/tx.vcxproj
Normal file
@@ -0,0 +1,339 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_api.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_block_pool.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_byte_pool.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_event_flags.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_initialize.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_mutex.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_queue.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_semaphore.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_thread.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_timer.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_trace.h" />
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_user.h" />
|
||||
<ClInclude Include="..\..\inc\tx_port.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_allocate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_release.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_allocate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_release.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_set.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_set_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_put.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_flush.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_front_send.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_receive.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_send.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_send_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_ceiling_put.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_put.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_put_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_entry_exit_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_preemption_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_priority_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_relinquish.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_reset.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_resume.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_suspend.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_terminate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_time_slice_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_wait_abort.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_activate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_deactivate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_allocate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_cleanup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_release.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_allocate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_cleanup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_search.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_release.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_cleanup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_set.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_set_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_initialize_high_level.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_initialize_kernel_enter.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_initialize_kernel_setup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_misra.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_cleanup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_priority_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_put.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_cleanup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_flush.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_front_send.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_receive.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_send.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_send_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_ceiling_put.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_cleanup.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_prioritize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_put.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_put_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_entry_exit_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_identify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_preemption_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_priority_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_relinquish.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_reset.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_resume.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_shell_entry.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_sleep.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_stack_analyze.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_stack_error_handler.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_stack_error_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_suspend.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_system_preempt_check.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_system_resume.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_system_suspend.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_terminate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_timeout.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_time_slice.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_time_slice_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_wait_abort.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_activate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_change.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_create.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_deactivate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_delete.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_expiration_process.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_performance_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_performance_system_info_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_system_activate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_system_deactivate.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_thread_entry.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_time_get.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_time_set.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_buffer_full_notify.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_disable.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_enable.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_event_filter.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_event_unfilter.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_initialize.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_interrupt_control.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_isr_enter_insert.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_isr_exit_insert.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_object_register.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_object_unregister.c" />
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_user_event_insert.c" />
|
||||
<ClCompile Include="..\..\src\tx_initialize_low_level.c" />
|
||||
<ClCompile Include="..\..\src\tx_thread_context_restore.c" />
|
||||
<ClCompile Include="..\..\src\tx_thread_context_save.c" />
|
||||
<ClCompile Include="..\..\src\tx_thread_interrupt_control.c" />
|
||||
<ClCompile Include="..\..\src\tx_thread_schedule.c" />
|
||||
<ClCompile Include="..\..\src\tx_thread_stack_build.c" />
|
||||
<ClCompile Include="..\..\src\tx_thread_system_return.c" />
|
||||
<ClCompile Include="..\..\src\tx_timer_interrupt.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<ProjectGuid>{51907112-62DA-98D6-7897-5A2FD48B99C3}</ProjectGuid>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>.\Release\</OutDir>
|
||||
<IntDir>.\Release\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>.\Debug\</OutDir>
|
||||
<IntDir>.\Debug\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<StringPooling>true</StringPooling>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerListingLocation>.\Release\</AssemblerListingLocation>
|
||||
<PrecompiledHeaderOutputFile>.\Release\tx.pch</PrecompiledHeaderOutputFile>
|
||||
<ObjectFileName>.\Release\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
|
||||
<AdditionalIncludeDirectories>..\;..\..\..\generic</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\tx.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release\tx.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
|
||||
<PrecompiledHeaderOutputFile>.\Debug\tx.pch</PrecompiledHeaderOutputFile>
|
||||
<ObjectFileName>.\Debug\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<AdditionalIncludeDirectories>..\..\inc;..\..\..\..\..\common\inc</AdditionalIncludeDirectories>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug\tx.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug\tx.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
633
ports/win32/vs_2019/example_build/tx/tx.vcxproj.filters
Normal file
633
ports/win32/vs_2019/example_build/tx/tx.vcxproj.filters
Normal file
@@ -0,0 +1,633 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="inc">
|
||||
<UniqueIdentifier>{096c4605-3053-4040-8f19-1e6fedb9568e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{3786c84c-e250-4a5c-b0a0-2a1d2c8979e3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\inc\tx_port.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_api.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_block_pool.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_byte_pool.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_event_flags.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_initialize.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_mutex.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_queue.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_semaphore.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_thread.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_timer.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_trace.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\common\inc\tx_user.h">
|
||||
<Filter>inc</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\tx_thread_context_restore.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_thread_context_save.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_thread_interrupt_control.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_thread_schedule.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_thread_stack_build.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_thread_system_return.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_timer_interrupt.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_allocate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_cleanup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_pool_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_block_release.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_allocate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_cleanup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_pool_search.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_byte_release.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_cleanup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_set.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_event_flags_set_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_initialize_high_level.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_initialize_kernel_enter.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_initialize_kernel_setup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_misra.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_cleanup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_priority_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_mutex_put.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_cleanup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_flush.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_front_send.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_receive.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_send.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_queue_send_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_ceiling_put.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_cleanup.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_put.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_semaphore_put_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_entry_exit_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_identify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_preemption_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_priority_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_relinquish.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_reset.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_resume.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_shell_entry.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_sleep.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_stack_analyze.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_stack_error_handler.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_stack_error_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_suspend.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_system_preempt_check.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_system_resume.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_system_suspend.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_terminate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_time_slice.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_time_slice_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_timeout.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_thread_wait_abort.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_time_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_time_set.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_activate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_deactivate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_expiration_process.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_performance_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_performance_system_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_system_activate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_system_deactivate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_timer_thread_entry.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_buffer_full_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_disable.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_enable.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_event_filter.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_event_unfilter.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_initialize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_interrupt_control.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_isr_enter_insert.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_isr_exit_insert.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_object_register.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_object_unregister.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\tx_trace_user_event_insert.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_allocate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_pool_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_block_release.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_allocate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_pool_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_byte_release.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_set.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_event_flags_set_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_mutex_put.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_flush.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_front_send.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_receive.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_send.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_queue_send_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_ceiling_put.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_prioritize.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_put.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_semaphore_put_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_entry_exit_notify.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_preemption_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_priority_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_relinquish.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_reset.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_resume.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_suspend.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_terminate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_time_slice_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_thread_wait_abort.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_activate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_change.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_create.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_deactivate.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_delete.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\..\common\src\txe_timer_info_get.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\tx_initialize_low_level.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
453
ports/win32/vs_2019/inc/tx_port.h
Normal file
453
ports/win32/vs_2019/inc/tx_port.h
Normal file
@@ -0,0 +1,453 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Port Specific */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* tx_port.h Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This file contains data type definitions that make the ThreadX */
|
||||
/* real-time kernel function identically on a variety of different */
|
||||
/* processor architectures. For example, the size or number of bits */
|
||||
/* in an "int" data type vary between microprocessor architectures and */
|
||||
/* even C compilers for the same microprocessor. ThreadX does not */
|
||||
/* directly use native C data types. Instead, ThreadX creates its */
|
||||
/* own special types that can be mapped to actual data types by this */
|
||||
/* file to guarantee consistency in the interface and functionality. */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TX_PORT_H
|
||||
#define TX_PORT_H
|
||||
|
||||
|
||||
/* Determine if the optional ThreadX user define file should be used. */
|
||||
|
||||
#ifdef TX_INCLUDE_USER_DEFINE_FILE
|
||||
|
||||
|
||||
/* Yes, include the user defines in tx_user.h. The defines in this file may
|
||||
alternately be defined on the command line. */
|
||||
|
||||
#include "tx_user.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Define compiler library include files. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* Define performance metric symbols. */
|
||||
|
||||
#ifndef TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_BLOCK_POOL_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_EVENT_FLAGS_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_MUTEX_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_MUTEX_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_QUEUE_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_QUEUE_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_SEMAPHORE_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_THREAD_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_THREAD_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
#ifndef TX_TIMER_ENABLE_PERFORMANCE_INFO
|
||||
#define TX_TIMER_ENABLE_PERFORMANCE_INFO
|
||||
#endif
|
||||
|
||||
|
||||
/* Enable trace info. */
|
||||
|
||||
#ifndef TX_ENABLE_EVENT_TRACE
|
||||
#define TX_ENABLE_EVENT_TRACE
|
||||
#endif
|
||||
|
||||
|
||||
/* Define ThreadX basic types for this port. */
|
||||
|
||||
#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;
|
||||
|
||||
|
||||
/* Add Win32 debug insert prototype. */
|
||||
|
||||
void _tx_win32_debug_entry_insert(char *action, char *file, unsigned long line);
|
||||
|
||||
#ifndef TX_WIN32_DEBUG_ENABLE
|
||||
|
||||
/* If Win32 debug is not enabled, turn logging into white-space. */
|
||||
|
||||
#define _tx_win32_debug_entry_insert(a, b, c)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Define the TX_MEMSET macro to remove library reference. */
|
||||
|
||||
#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; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/* Include windows include file. */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
/* Define the priority levels for ThreadX. Legal values range
|
||||
from 32 to 1024 and MUST be evenly divisible by 32. */
|
||||
|
||||
#ifndef TX_MAX_PRIORITIES
|
||||
#define TX_MAX_PRIORITIES 32
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the minimum stack for a ThreadX thread on this processor. If the size supplied during
|
||||
thread creation is less than this value, the thread create call will return an error. */
|
||||
|
||||
#ifndef TX_MINIMUM_STACK
|
||||
#define TX_MINIMUM_STACK 200 /* Minimum stack size for this port */
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the system timer thread's default stack size and priority. These are only applicable
|
||||
if TX_TIMER_PROCESS_IN_ISR is not defined. */
|
||||
|
||||
#ifndef TX_TIMER_THREAD_STACK_SIZE
|
||||
#define TX_TIMER_THREAD_STACK_SIZE 400 /* Default timer thread stack size - Not used in Win32 port! */
|
||||
#endif
|
||||
|
||||
#ifndef TX_TIMER_THREAD_PRIORITY
|
||||
#define TX_TIMER_THREAD_PRIORITY 0 /* Default timer thread priority */
|
||||
#endif
|
||||
|
||||
|
||||
/* Define various constants for the ThreadX port. */
|
||||
|
||||
#define TX_INT_DISABLE 1 /* Disable interrupts */
|
||||
#define TX_INT_ENABLE 0 /* Enable interrupts */
|
||||
|
||||
|
||||
/* Define the 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 ((ULONG) (_tx_win32_time_stamp.LowPart));
|
||||
#endif
|
||||
#ifndef TX_TRACE_TIME_MASK
|
||||
#define TX_TRACE_TIME_MASK 0xFFFFFFFFUL
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the port-specific trace extension to pickup the Windows timer. */
|
||||
|
||||
#define TX_TRACE_PORT_EXTENSION QueryPerformanceCounter((LARGE_INTEGER *)&_tx_win32_time_stamp);
|
||||
|
||||
|
||||
/* Define the port specific options for the _tx_build_options variable. This variable indicates
|
||||
how the ThreadX library was built. */
|
||||
|
||||
#define TX_PORT_SPECIFIC_BUILD_OPTIONS 0
|
||||
|
||||
|
||||
/* Define the in-line initialization constant so that modules with in-line
|
||||
initialization capabilities can prevent their initialization from being
|
||||
a function call. */
|
||||
|
||||
#define TX_INLINE_INITIALIZATION
|
||||
|
||||
|
||||
/* Define the Win32-specific initialization code that is expanded in the generic source. */
|
||||
|
||||
void _tx_initialize_start_interrupts(void);
|
||||
|
||||
#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION _tx_initialize_start_interrupts();
|
||||
|
||||
|
||||
/* 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. */
|
||||
|
||||
#ifdef TX_ENABLE_STACK_CHECKING
|
||||
#undef TX_DISABLE_STACK_FILLING
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the TX_THREAD control block extensions for this port. The main reason
|
||||
for the multiple macros is so that backward compatibility can be maintained with
|
||||
existing ThreadX kernel awareness modules. */
|
||||
|
||||
#define TX_THREAD_EXTENSION_0 HANDLE tx_thread_win32_thread_handle; \
|
||||
DWORD tx_thread_win32_thread_id; \
|
||||
HANDLE tx_thread_win32_thread_run_semaphore; \
|
||||
UINT tx_thread_win32_suspension_type; \
|
||||
UINT tx_thread_win32_int_disabled_flag;
|
||||
#define TX_THREAD_EXTENSION_1
|
||||
#define TX_THREAD_EXTENSION_2
|
||||
#define TX_THREAD_EXTENSION_3
|
||||
|
||||
|
||||
/* Define the port extensions of the remaining ThreadX objects. */
|
||||
|
||||
#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
|
||||
|
||||
|
||||
/* Define the user extension field of the thread control block. Nothing
|
||||
additional is needed for this port so it is defined as white space. */
|
||||
|
||||
#ifndef TX_THREAD_USER_EXTENSION
|
||||
#define TX_THREAD_USER_EXTENSION
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the macros for processing extensions in tx_thread_create, tx_thread_delete,
|
||||
tx_thread_shell_entry, and tx_thread_terminate. */
|
||||
|
||||
|
||||
#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 the ThreadX object creation extensions for the remaining objects. */
|
||||
|
||||
#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 the ThreadX object deletion extensions for the remaining objects. */
|
||||
|
||||
#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)
|
||||
|
||||
|
||||
struct TX_THREAD_STRUCT;
|
||||
|
||||
/* Define the Win32 critical section data structure. */
|
||||
|
||||
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;
|
||||
|
||||
|
||||
/* Define Win32-specific critical section APIs. */
|
||||
|
||||
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);
|
||||
|
||||
|
||||
/* Define post completion processing for tx_thread_delete, so that the Win32 thread resources are properly removed. */
|
||||
|
||||
#define TX_THREAD_DELETE_PORT_COMPLETION(thread_ptr) \
|
||||
{ \
|
||||
BOOL win32_status; \
|
||||
DWORD exitcode; \
|
||||
HANDLE threadrunsemaphore; \
|
||||
HANDLE threadhandle; \
|
||||
threadhandle = thread_ptr -> tx_thread_win32_thread_handle; \
|
||||
threadrunsemaphore = thread_ptr -> tx_thread_win32_thread_run_semaphore; \
|
||||
_tx_thread_interrupt_restore(tx_saved_posture); \
|
||||
do \
|
||||
{ \
|
||||
win32_status = GetExitCodeThread(threadhandle, &exitcode); \
|
||||
if ((win32_status) && (exitcode != STILL_ACTIVE)) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
ResumeThread(threadhandle); \
|
||||
ReleaseSemaphore(threadrunsemaphore, 1, NULL); \
|
||||
Sleep(1); \
|
||||
} while (1); \
|
||||
CloseHandle(threadhandle); \
|
||||
tx_saved_posture = _tx_thread_interrupt_disable(); \
|
||||
}
|
||||
|
||||
|
||||
/* Define post completion processing for tx_thread_reset, so that the Win32 thread resources are properly removed. */
|
||||
|
||||
#define TX_THREAD_RESET_PORT_COMPLETION(thread_ptr) \
|
||||
{ \
|
||||
BOOL win32_status; \
|
||||
DWORD exitcode; \
|
||||
HANDLE threadrunsemaphore; \
|
||||
HANDLE threadhandle; \
|
||||
threadhandle = thread_ptr -> tx_thread_win32_thread_handle; \
|
||||
threadrunsemaphore = thread_ptr -> tx_thread_win32_thread_run_semaphore; \
|
||||
_tx_thread_interrupt_restore(tx_saved_posture); \
|
||||
do \
|
||||
{ \
|
||||
win32_status = GetExitCodeThread(threadhandle, &exitcode); \
|
||||
if ((win32_status) && (exitcode != STILL_ACTIVE)) \
|
||||
{ \
|
||||
break; \
|
||||
} \
|
||||
ResumeThread(threadhandle); \
|
||||
ReleaseSemaphore(threadrunsemaphore, 1, NULL); \
|
||||
Sleep(1); \
|
||||
} while (1); \
|
||||
CloseHandle(threadhandle); \
|
||||
tx_saved_posture = _tx_thread_interrupt_disable(); \
|
||||
}
|
||||
|
||||
|
||||
/* Define ThreadX interrupt lockout and restore macros for protection on
|
||||
access of critical kernel information. The restore interrupt macro must
|
||||
restore the interrupt posture of the running thread prior to the value
|
||||
present prior to the disable macro. In most cases, the save area macro
|
||||
is used to define a local function save area for the disable and restore
|
||||
macros. */
|
||||
|
||||
UINT _tx_thread_interrupt_disable(void);
|
||||
VOID _tx_thread_interrupt_restore(UINT previous_posture);
|
||||
|
||||
#define TX_INTERRUPT_SAVE_AREA UINT tx_saved_posture;
|
||||
|
||||
#define TX_DISABLE tx_saved_posture = _tx_thread_interrupt_disable();
|
||||
|
||||
#define TX_RESTORE _tx_thread_interrupt_restore(tx_saved_posture);
|
||||
|
||||
|
||||
/* Define the interrupt lockout macros for each ThreadX object. */
|
||||
|
||||
#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
|
||||
|
||||
|
||||
/* Define the version ID of ThreadX. This may be utilized by the application. */
|
||||
|
||||
#ifdef TX_THREAD_INIT
|
||||
CHAR _tx_version_id[] =
|
||||
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX Win32/Visual Studio Version 6.0 *";
|
||||
#else
|
||||
extern CHAR _tx_version_id[];
|
||||
#endif
|
||||
|
||||
|
||||
/* Define externals for the Win32 port of ThreadX. */
|
||||
|
||||
extern TX_WIN32_CRITICAL_SECTION _tx_win32_critical_section;
|
||||
extern HANDLE _tx_win32_scheduler_semaphore;
|
||||
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 DWORD _tx_win32_timer_id;
|
||||
extern LARGE_INTEGER _tx_win32_time_stamp;
|
||||
|
||||
|
||||
#ifndef TX_WIN32_MEMORY_SIZE
|
||||
#define TX_WIN32_MEMORY_SIZE 64000
|
||||
#endif
|
||||
|
||||
#ifndef TX_TIMER_PERIODIC
|
||||
#define TX_TIMER_PERIODIC 18
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
155
ports/win32/vs_2019/readme_threadx.txt
Normal file
155
ports/win32/vs_2019/readme_threadx.txt
Normal file
@@ -0,0 +1,155 @@
|
||||
Microsoft's Azure RTOS ThreadX for Win32
|
||||
|
||||
Using the Visual Studio Tools
|
||||
|
||||
|
||||
1. Open the ThreadX Project Workspace
|
||||
|
||||
In order to build the ThreadX library and the ThreadX demonstration first load
|
||||
the Azure RTOS Workspace azure_rtos.sln, which is located inside the "example_build"
|
||||
directory.
|
||||
|
||||
|
||||
2. Building the ThreadX run-time Library
|
||||
|
||||
Building the ThreadX library is easy; simply make the "tx" project active and
|
||||
then select the build button. You should now observe the compilation of the
|
||||
ThreadX library source. This project build produces the ThreadX library file
|
||||
tx.lib.
|
||||
|
||||
|
||||
3. Building the Demonstration System
|
||||
|
||||
You are now ready to run the ThreadX Win32 demonstration. Simply make the
|
||||
"sample_thread" project active and then select the build button. When the build
|
||||
is finished, select the run button from Visual Studio and observe various
|
||||
demonstration statistics being printed to the console window. You may also set
|
||||
breakpoints, single step, perform data watches, etc.
|
||||
|
||||
|
||||
4. System Initialization
|
||||
|
||||
The system entry point is at main(), which is defined in the application.
|
||||
Once the application calls tx_kernel_enter, ThreadX starts running and
|
||||
performs various initialization duties prior to starting the scheduler. The
|
||||
Win32-specific initialization is done in the function _tx_initialize_low_level,
|
||||
which is located in the file tx_initialize_low_level.c. This function is
|
||||
responsible for setting up various system data structures and simulated
|
||||
interrupts - including the periodic timer interrupt source for ThreadX.
|
||||
|
||||
In addition, _tx_initialize_low_level determines the first available
|
||||
address for use by the application. In Win32, this is basically done
|
||||
by using malloc to get a big block of memory from Windows.
|
||||
|
||||
|
||||
5. Win32 Implementation
|
||||
|
||||
ThreadX for Win32 is implemented using Win32 threads. Each application
|
||||
thread in ThreadX actually runs as a Win32 thread. The determination of
|
||||
which application thread to run is made by the ThreadX scheduler, which
|
||||
itself is a Win32 thread. The ThreadX scheduler is the highest priority
|
||||
thread in the system.
|
||||
|
||||
Interrupts in ThreadX/Win32 are also simulated by threads. A good example
|
||||
is the ThreadX system timer interrupt, which can be found in
|
||||
tx_initialize_low_level.c.
|
||||
|
||||
5.1 ThreadX Limitations
|
||||
|
||||
ThreadX for Win32 behaves in the same manner as ThreadX in an embedded
|
||||
environment EXCEPT in the case of thread termination. Unfortunately, the
|
||||
Win32 API does not have a good mechanism to terminate threads and instead
|
||||
must rely on the thread itself terminating. Hence, threads in the ThreadX
|
||||
Win32 implementation must have some ThreadX call periodically in their
|
||||
processing if they can be terminated by another ThreadX thread.
|
||||
|
||||
|
||||
6. Improving Performance
|
||||
|
||||
The distribution version of ThreadX is built without any compiler
|
||||
optimizations. This makes it easy to debug because you can trace or set
|
||||
breakpoints inside of ThreadX itself. Of course, this costs some
|
||||
performance. To make it run faster, you can change the tx project file to
|
||||
enable all compiler optimizations. In addition, you can eliminate the
|
||||
ThreadX basic API error checking by compiling your application code with the
|
||||
symbol TX_DISABLE_ERROR_CHECKING defined.
|
||||
|
||||
|
||||
7. Interrupt Handling
|
||||
|
||||
ThreadX provides simulated interrupt handling with Win32 threads. Simulated
|
||||
interrupt threads may be created by the application or may be added to the
|
||||
simulated timer interrupt defined in tx_initialize_low_level.c. The following
|
||||
format for creating simulated interrupts should be used:
|
||||
|
||||
7.1 Data structures
|
||||
|
||||
Here is an example of how to define the Win32 data structures and prototypes
|
||||
necessary to create a simulated interrupt thread:
|
||||
|
||||
HANDLE _sample_win32_interrupt_handle;
|
||||
DWORD _sample_win32_interrupt_id;
|
||||
DWORD WINAPI _sample_win32_interrupt(LPVOID);
|
||||
|
||||
|
||||
7.2 Creating a Simulated Interrupt Thread
|
||||
|
||||
Here is an example of how to create a simulated interrupt thread in Win32.
|
||||
This may be done inside of tx_initialize_low_level.c or from your application code
|
||||
|
||||
_sample_win32_interrupt_handle =
|
||||
CreateThread(NULL, 0, _sample_win32_interrupt, (LPVOID) &_sample_win32_interrupt_handle,
|
||||
CREATE_SUSPENDED, &_sample_win32_interrupt_id);
|
||||
|
||||
SetThreadPriority(_sample_win32_interrupt_handle, THREAD_PRIORITY_BELOW_NORMAL);
|
||||
|
||||
|
||||
7.3 Activating the Simulated Interrupt Thread
|
||||
|
||||
Simulated interrupt threads should not be activated until initialization is complete, i.e. until
|
||||
ThreadX is ready to schedule threads. The following activation code may be added to the routine
|
||||
in tx_initialize_low_level.c called _tx_initialize_start_interrupts or into the application code directly:
|
||||
|
||||
ResumeThread(_sample_win32_interrupt_handle);
|
||||
|
||||
|
||||
7.4 Simulated Interrupt Thread Template
|
||||
|
||||
The following is a template for the simulated interrupt thread. This interrupt will occur on
|
||||
a periodic basis.
|
||||
|
||||
DWORD WINAPI _sample_win32_interrupt(LPVOID *ptr)
|
||||
{
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Sleep for the desired time. */
|
||||
Sleep(18);
|
||||
|
||||
/* Call ThreadX context save for interrupt preparation. */
|
||||
_tx_thread_context_save();
|
||||
|
||||
/* Call application ISR here! */
|
||||
|
||||
/* Call ThreadX context restore for interrupt completion. */
|
||||
_tx_thread_context_restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
8. Revision History
|
||||
|
||||
For generic code revision information, please refer to the readme_threadx_generic.txt
|
||||
file, which is included in your distribution. The following details the revision
|
||||
information associated with this specific port of ThreadX:
|
||||
|
||||
06/30/2020 Initial ThreadX version for Win32 using Microsoft Visual C/C++.
|
||||
|
||||
|
||||
Copyright(c) 1996-2020 Microsoft Corporation
|
||||
|
||||
|
||||
https://azure.com/rtos
|
||||
|
||||
307
ports/win32/vs_2019/src/tx_initialize_low_level.c
Normal file
307
ports/win32/vs_2019/src/tx_initialize_low_level.c
Normal file
@@ -0,0 +1,307 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
/* Define various Win32 objects used by the ThreadX port. */
|
||||
|
||||
TX_WIN32_CRITICAL_SECTION _tx_win32_critical_section;
|
||||
HANDLE _tx_win32_scheduler_semaphore;
|
||||
DWORD _tx_win32_scheduler_id;
|
||||
ULONG _tx_win32_global_int_disabled_flag;
|
||||
LARGE_INTEGER _tx_win32_time_stamp;
|
||||
ULONG _tx_win32_system_error;
|
||||
extern TX_THREAD *_tx_thread_current_ptr;
|
||||
|
||||
|
||||
/* Define simulated timer interrupt. This is done inside a thread, which is
|
||||
how other interrupts may be defined as well. See code below for an
|
||||
example. */
|
||||
|
||||
HANDLE _tx_win32_timer_handle;
|
||||
DWORD _tx_win32_timer_id;
|
||||
DWORD WINAPI _tx_win32_timer_interrupt(LPVOID p);
|
||||
|
||||
|
||||
#ifdef TX_WIN32_DEBUG_ENABLE
|
||||
|
||||
extern ULONG _tx_thread_system_state;
|
||||
extern UINT _tx_thread_preempt_disable;
|
||||
extern TX_THREAD *_tx_thread_current_ptr;
|
||||
extern TX_THREAD *_tx_thread_execute_ptr;
|
||||
|
||||
|
||||
/* Define the maximum size of the Win32 debug array. */
|
||||
|
||||
#ifndef TX_WIN32_DEBUG_EVENT_SIZE
|
||||
#define TX_WIN32_DEBUG_EVENT_SIZE 400
|
||||
#endif
|
||||
|
||||
|
||||
/* Define debug log in order to debug Win32 issues with this port. */
|
||||
|
||||
typedef struct TX_WIN32_DEBUG_ENTRY_STRUCT
|
||||
{
|
||||
char *tx_win32_debug_entry_action;
|
||||
LARGE_INTEGER tx_win32_debug_entry_timestamp;
|
||||
char *tx_win32_debug_entry_file;
|
||||
unsigned long tx_win32_debug_entry_line;
|
||||
TX_WIN32_CRITICAL_SECTION tx_win32_debug_entry_critical_section;
|
||||
unsigned long tx_win32_debug_entry_int_disabled_flag;
|
||||
ULONG tx_win32_debug_entry_system_state;
|
||||
UINT tx_win32_debug_entry_preempt_disable;
|
||||
TX_THREAD *tx_win32_debug_entry_current_thread;
|
||||
DWORD tx_win32_debug_entry_current_thread_id;
|
||||
TX_THREAD *tx_win32_debug_entry_execute_thread;
|
||||
DWORD tx_win32_debug_entry_execute_thread_id;
|
||||
DWORD tx_win32_debug_entry_running_id;
|
||||
} TX_WIN32_DEBUG_ENTRY;
|
||||
|
||||
|
||||
/* Define the circular array of Win32 debug entries. */
|
||||
|
||||
TX_WIN32_DEBUG_ENTRY _tx_win32_debug_entry_array[TX_WIN32_DEBUG_EVENT_SIZE];
|
||||
|
||||
|
||||
/* Define the Win32 debug index. */
|
||||
|
||||
unsigned long _tx_win32_debug_entry_index = 0;
|
||||
|
||||
|
||||
/* Now define the debug entry function. */
|
||||
void _tx_win32_debug_entry_insert(char *action, char *file, unsigned long line)
|
||||
{
|
||||
|
||||
|
||||
/* Get the time stamp. */
|
||||
QueryPerformanceCounter((LARGE_INTEGER *)&_tx_win32_time_stamp);
|
||||
|
||||
/* Setup the debug entry. */
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_action = action;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_timestamp = _tx_win32_time_stamp;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_file = file;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_line = line;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_critical_section = _tx_win32_critical_section;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_int_disabled_flag = _tx_win32_global_int_disabled_flag;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_system_state = _tx_thread_system_state;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_preempt_disable = _tx_thread_preempt_disable;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_current_thread = _tx_thread_current_ptr;
|
||||
if (_tx_thread_current_ptr)
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_current_thread_id = _tx_thread_current_ptr -> tx_thread_win32_thread_id;
|
||||
else
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_current_thread_id = 0;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_execute_thread = _tx_thread_execute_ptr;
|
||||
if (_tx_thread_execute_ptr)
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_execute_thread_id = _tx_thread_execute_ptr -> tx_thread_win32_thread_id;
|
||||
else
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_execute_thread_id = 0;
|
||||
_tx_win32_debug_entry_array[_tx_win32_debug_entry_index].tx_win32_debug_entry_running_id = GetCurrentThreadId();
|
||||
|
||||
/* Now move to the next entry. */
|
||||
_tx_win32_debug_entry_index++;
|
||||
|
||||
/* Determine if we need to wrap the list. */
|
||||
if (_tx_win32_debug_entry_index >= TX_WIN32_DEBUG_EVENT_SIZE)
|
||||
{
|
||||
|
||||
/* Yes, wrap the list! */
|
||||
_tx_win32_debug_entry_index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Define the ThreadX timer interrupt handler. */
|
||||
|
||||
void _tx_timer_interrupt(void);
|
||||
|
||||
|
||||
/* Define other external function references. */
|
||||
|
||||
VOID _tx_initialize_low_level(VOID);
|
||||
VOID _tx_thread_context_save(VOID);
|
||||
VOID _tx_thread_context_restore(VOID);
|
||||
|
||||
|
||||
/* Define other external variable references. */
|
||||
|
||||
extern VOID *_tx_initialize_unused_memory;
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_initialize_low_level Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function is responsible for any low-level processor */
|
||||
/* initialization, including setting up interrupt vectors, setting */
|
||||
/* up a periodic timer interrupt source, saving the system stack */
|
||||
/* pointer for use in ISR processing later, and finding the first */
|
||||
/* available RAM memory address for tx_application_define. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* CreateMutex Win32 create mutex */
|
||||
/* CreateThread Win32 create thread */
|
||||
/* CreateSemaphore Win32 create semaphore */
|
||||
/* GetCurrentThreadId Win32 get current thread ID */
|
||||
/* SetProcessAffinityMask Win32 process affinity set */
|
||||
/* SetThreadPriority Win32 set thread priority */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* _tx_initialize_kernel_enter ThreadX entry function */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_initialize_low_level(VOID)
|
||||
{
|
||||
|
||||
/* Deprecate TX_WIN32_MULTI_CORE build option and default to restricting
|
||||
execution to one core. */
|
||||
|
||||
#ifndef TX_WIN32_BYPASS_AFFINITY_SETUP
|
||||
|
||||
/* Limit this ThreadX simulation on Win32 to a single core. */
|
||||
if (SetProcessAffinityMask( GetCurrentProcess(), 1 ) == 0)
|
||||
{
|
||||
|
||||
/* Error restricting the process to one core. */
|
||||
printf("ThreadX Win32 error restricting the process to one core!\n");
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Pickup the first available memory address. */
|
||||
|
||||
/* Save the first available memory address. */
|
||||
_tx_initialize_unused_memory = malloc(TX_WIN32_MEMORY_SIZE);
|
||||
|
||||
/* Pickup the unique Id of the current thread, which will also be the Id of the scheduler. */
|
||||
_tx_win32_scheduler_id = GetCurrentThreadId();
|
||||
|
||||
/* Create the system critical section mutex. This is used by the system to block all other access,
|
||||
analogous to an interrupt lockout on an embedded target. */
|
||||
_tx_win32_critical_section.tx_win32_critical_section_mutex_handle = CreateMutex(NULL, FALSE, NULL);
|
||||
_tx_win32_critical_section.tx_win32_critical_section_nested_count = 0;
|
||||
_tx_win32_critical_section.tx_win32_critical_section_owner = 0;
|
||||
|
||||
/* Create the semaphore that regulates when the scheduler executes. */
|
||||
_tx_win32_scheduler_semaphore = CreateSemaphore(NULL, 0, 1, NULL);
|
||||
|
||||
/* Initialize the global interrupt disabled flag. */
|
||||
_tx_win32_global_int_disabled_flag = TX_FALSE;
|
||||
|
||||
/* Setup periodic timer interrupt. */
|
||||
_tx_win32_timer_handle =
|
||||
CreateThread(NULL, 0, _tx_win32_timer_interrupt, (LPVOID) &_tx_win32_timer_handle,CREATE_SUSPENDED, &_tx_win32_timer_id);
|
||||
|
||||
/* Check for a good thread create. */
|
||||
if (!_tx_win32_timer_handle)
|
||||
{
|
||||
|
||||
/* Error creating the timer interrupt. */
|
||||
printf("ThreadX Win32 error creating timer interrupt thread!\n");
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, we have a good thread create. Now set the priority to
|
||||
a level lower than the system thread but higher than the application
|
||||
threads. */
|
||||
SetThreadPriority(_tx_win32_timer_handle, THREAD_PRIORITY_BELOW_NORMAL);
|
||||
|
||||
/* Done, return to caller. */
|
||||
}
|
||||
|
||||
|
||||
/* This routine is called after initialization is complete in order to start
|
||||
all interrupt threads. Interrupt threads in addition to the timer may
|
||||
be added to this routine as well. */
|
||||
|
||||
void _tx_initialize_start_interrupts(void)
|
||||
{
|
||||
|
||||
/* Kick the timer thread off to generate the ThreadX periodic interrupt
|
||||
source. */
|
||||
ResumeThread(_tx_win32_timer_handle);
|
||||
}
|
||||
|
||||
|
||||
/* Define the ThreadX system timer interrupt. Other interrupts may be simulated
|
||||
in a similar way. */
|
||||
|
||||
|
||||
DWORD WINAPI _tx_win32_timer_interrupt(LPVOID p)
|
||||
{
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Sleep for the desired time. */
|
||||
Sleep(TX_TIMER_PERIODIC);
|
||||
|
||||
/* Call ThreadX context save for interrupt preparation. */
|
||||
_tx_thread_context_save();
|
||||
|
||||
|
||||
/* Call the ThreadX system timer interrupt processing. */
|
||||
_tx_timer_interrupt();
|
||||
|
||||
/* Call ThreadX context restore for interrupt completion. */
|
||||
_tx_thread_context_restore();
|
||||
}
|
||||
}
|
||||
132
ports/win32/vs_2019/src/tx_thread_context_restore.c
Normal file
132
ports/win32/vs_2019/src/tx_thread_context_restore.c
Normal file
@@ -0,0 +1,132 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
#include "tx_timer.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_context_restore Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function restores the interrupt context if it is processing a */
|
||||
/* nested interrupt. If not, it returns to the interrupt thread if no */
|
||||
/* preemption is necessary. Otherwise, if preemption is necessary or */
|
||||
/* if no thread was running, the function returns to the scheduler. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* ReleaseSemaphore Win32 release semaphore */
|
||||
/* ResumeThread Win32 resume thread */
|
||||
/* _tx_win32_critical_section_obtain Obtain critical section */
|
||||
/* _tx_win32_critical_section_release Release critical section */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* ISRs Interrupt Service Routines */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_thread_context_restore(VOID)
|
||||
{
|
||||
|
||||
/* Enter critical section to ensure other threads are not playing with
|
||||
the core ThreadX data structures. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("CONTEXT_RESTORE", __FILE__, __LINE__);
|
||||
|
||||
/* Decrement the nested interrupt count. */
|
||||
_tx_thread_system_state--;
|
||||
|
||||
/* Determine if this is the first nested interrupt and if a ThreadX
|
||||
application thread was running at the time. */
|
||||
if ((!_tx_thread_system_state) && (_tx_thread_current_ptr))
|
||||
{
|
||||
|
||||
/* Yes, this is the first and last interrupt processed. */
|
||||
|
||||
/* Check to see if preemption is required. */
|
||||
if ((_tx_thread_preempt_disable == 0) && (_tx_thread_current_ptr != _tx_thread_execute_ptr))
|
||||
{
|
||||
|
||||
/* Preempt the running application thread. We don't need to suspend the
|
||||
application thread since that is done in the context save processing. */
|
||||
|
||||
/* Indicate that this thread was suspended asynchronously. */
|
||||
_tx_thread_current_ptr -> tx_thread_win32_suspension_type = 1;
|
||||
|
||||
/* Save the remaining time-slice and disable it. */
|
||||
if (_tx_timer_time_slice)
|
||||
{
|
||||
|
||||
_tx_thread_current_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
|
||||
_tx_timer_time_slice = 0;
|
||||
}
|
||||
|
||||
/* Clear the current thread pointer. */
|
||||
_tx_thread_current_ptr = TX_NULL;
|
||||
|
||||
/* Wakeup the system thread by setting the system semaphore. */
|
||||
ReleaseSemaphore(_tx_win32_scheduler_semaphore, 1, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Since preemption is not required, resume the interrupted thread. */
|
||||
ResumeThread(_tx_thread_current_ptr -> tx_thread_win32_thread_handle);
|
||||
}
|
||||
}
|
||||
|
||||
/* Leave Win32 critical section. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
}
|
||||
|
||||
113
ports/win32/vs_2019/src/tx_thread_context_save.c
Normal file
113
ports/win32/vs_2019/src/tx_thread_context_save.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
#include "tx_timer.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_context_save Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function saves the context of an executing thread in the */
|
||||
/* beginning of interrupt processing. The function also ensures that */
|
||||
/* the system stack is used upon return to the calling ISR. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* SuspendThread Win32 thread suspend */
|
||||
/* _tx_win32_critical_section_obtain Obtain critical section */
|
||||
/* _tx_win32_critical_section_release Release critical section */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* ISRs */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_thread_context_save(VOID)
|
||||
{
|
||||
|
||||
TX_THREAD *thread_ptr;
|
||||
|
||||
|
||||
/* Enter critical section to ensure other threads are not playing with
|
||||
the core ThreadX data structures. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("CONTEXT_SAVE", __FILE__, __LINE__);
|
||||
|
||||
/* Pickup the current thread pointer. */
|
||||
thread_ptr = _tx_thread_current_ptr;
|
||||
|
||||
/* If an application thread is running, suspend it to simulate preemption. */
|
||||
if ((thread_ptr) && (_tx_thread_system_state == 0))
|
||||
{
|
||||
|
||||
/* Yes, this is the first interrupt and an application thread is running...
|
||||
suspend it! */
|
||||
|
||||
/* Suspend the thread to simulate preemption. Note that the thread is suspended BEFORE the protection get
|
||||
flag is checked to ensure there is not a race condition between this thread and the update of that flag. */
|
||||
SuspendThread(thread_ptr -> tx_thread_win32_thread_handle);
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("CONTEXT_SAVE-suspend_thread", __FILE__, __LINE__);
|
||||
|
||||
}
|
||||
|
||||
/* Increment the nested interrupt condition. */
|
||||
_tx_thread_system_state++;
|
||||
|
||||
/* Exit Win32 critical section. */
|
||||
_tx_win32_critical_section_release(&_tx_win32_critical_section);
|
||||
}
|
||||
|
||||
213
ports/win32/vs_2019/src/tx_thread_interrupt_control.c
Normal file
213
ports/win32/vs_2019/src/tx_thread_interrupt_control.c
Normal file
@@ -0,0 +1,213 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
|
||||
#include <winbase.h>
|
||||
|
||||
/* Define small routines used for the TX_DISABLE/TX_RESTORE macros. */
|
||||
|
||||
UINT _tx_thread_interrupt_disable(void)
|
||||
{
|
||||
|
||||
UINT previous_value;
|
||||
|
||||
|
||||
previous_value = _tx_thread_interrupt_control(TX_INT_DISABLE);
|
||||
return(previous_value);
|
||||
}
|
||||
|
||||
|
||||
VOID _tx_thread_interrupt_restore(UINT previous_posture)
|
||||
{
|
||||
|
||||
previous_posture = _tx_thread_interrupt_control(previous_posture);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_interrupt_control Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function is responsible for changing the interrupt lockout */
|
||||
/* posture of the system. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* new_posture New interrupt lockout posture */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* old_posture Old interrupt lockout posture */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* ExitThread Win32 thread exit */
|
||||
/* GetCurrentThread Win32 get current thread */
|
||||
/* GetCurrentThreadId Win32 get current thread ID */
|
||||
/* GetThreadPriority Win32 get thread priority */
|
||||
/* _tx_win32_critical_section_obtain Obtain critical section */
|
||||
/* _tx_win32_critical_section_release Release critical section */
|
||||
/* _tx_win32_critical_section_release_all */
|
||||
/* Release critical section */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* Application Code */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
UINT _tx_thread_interrupt_control(UINT new_posture)
|
||||
{
|
||||
|
||||
UINT old_posture;
|
||||
HANDLE threadhandle;
|
||||
int threadpriority;
|
||||
DWORD threadid;
|
||||
TX_THREAD *thread_ptr;
|
||||
|
||||
|
||||
/* Enter Win32 critical section. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
#ifdef TX_WIN32_DEBUG_ENABLE
|
||||
|
||||
/* Determine if this is a disable or enable request. */
|
||||
if (new_posture == TX_INT_ENABLE)
|
||||
{
|
||||
/* Enable. */
|
||||
_tx_win32_debug_entry_insert("RESTORE", __FILE__, __LINE__);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Disable. */
|
||||
_tx_win32_debug_entry_insert("DISABLE", __FILE__, __LINE__);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Determine if the thread was terminated. */
|
||||
|
||||
/* Pickup the handle of the current thread. */
|
||||
threadhandle = GetCurrentThread();
|
||||
|
||||
/* Pickup the current thread pointer. */
|
||||
thread_ptr = _tx_thread_current_ptr;
|
||||
|
||||
/* Pickup the priority of the current thread. */
|
||||
threadpriority = GetThreadPriority(threadhandle);
|
||||
|
||||
/* Pickup the ID of the current thread. */
|
||||
threadid = GetCurrentThreadId();
|
||||
|
||||
/* Determine if this is a thread (THREAD_PRIORITY_LOWEST) and it does not
|
||||
match the current thread pointer. */
|
||||
if ((threadpriority == THREAD_PRIORITY_LOWEST) &&
|
||||
((!thread_ptr) || (thread_ptr -> tx_thread_win32_thread_id != threadid)))
|
||||
{
|
||||
|
||||
/* This indicates the Win32 thread was actually terminated by ThreadX is only
|
||||
being allowed to run in order to cleanup its resources. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
|
||||
/* Exit this thread. */
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
/* Determine the current interrupt lockout condition. */
|
||||
if (_tx_win32_critical_section.tx_win32_critical_section_nested_count == 1)
|
||||
{
|
||||
|
||||
/* First pass through, interrupts are enabled. */
|
||||
old_posture = TX_INT_ENABLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Interrupts are disabled. */
|
||||
old_posture = TX_INT_DISABLE;
|
||||
}
|
||||
|
||||
/* First, determine if this call is from a non-thread. */
|
||||
if (_tx_thread_system_state)
|
||||
{
|
||||
|
||||
/* Determine how to apply the new posture. */
|
||||
if (new_posture == TX_INT_ENABLE)
|
||||
{
|
||||
|
||||
/* Clear the disabled flag. */
|
||||
_tx_win32_global_int_disabled_flag = TX_FALSE;
|
||||
|
||||
/* Determine if the critical section is locked. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
}
|
||||
else if (new_posture == TX_INT_DISABLE)
|
||||
{
|
||||
|
||||
/* Set the disabled flag. */
|
||||
_tx_win32_global_int_disabled_flag = TX_TRUE;
|
||||
}
|
||||
}
|
||||
else if (thread_ptr)
|
||||
{
|
||||
|
||||
/* Determine how to apply the new posture. */
|
||||
if (new_posture == TX_INT_ENABLE)
|
||||
{
|
||||
|
||||
/* Clear the disabled flag. */
|
||||
_tx_thread_current_ptr -> tx_thread_win32_int_disabled_flag = TX_FALSE;
|
||||
|
||||
/* Determine if the critical section is locked. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
}
|
||||
else if (new_posture == TX_INT_DISABLE)
|
||||
{
|
||||
|
||||
/* Set the disabled flag. */
|
||||
_tx_thread_current_ptr -> tx_thread_win32_int_disabled_flag = TX_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the previous interrupt disable posture. */
|
||||
return(old_posture);
|
||||
}
|
||||
|
||||
291
ports/win32/vs_2019/src/tx_thread_schedule.c
Normal file
291
ports/win32/vs_2019/src/tx_thread_schedule.c
Normal file
@@ -0,0 +1,291 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
#include "tx_timer.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_schedule Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function waits for a thread control block pointer to appear in */
|
||||
/* the _tx_thread_execute_ptr variable. Once a thread pointer appears */
|
||||
/* in the variable, the corresponding thread is resumed. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* ReleaseSemaphore Win32 release semaphore */
|
||||
/* ResumeThread Win32 resume thread */
|
||||
/* Sleep Win32 thread sleep */
|
||||
/* WaitForSingleObject Win32 wait on a semaphore */
|
||||
/* _tx_win32_critical_section_obtain Obtain critical section */
|
||||
/* _tx_win32_critical_section_release Release critical section */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* _tx_initialize_kernel_enter ThreadX entry function */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_thread_schedule(VOID)
|
||||
{
|
||||
|
||||
|
||||
/* Loop forever. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
/* Wait for a thread to execute and all ISRs to complete. */
|
||||
while(1)
|
||||
{
|
||||
|
||||
|
||||
/* Enter Win32 critical section. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SCHEDULE-wake_up", __FILE__, __LINE__);
|
||||
|
||||
/* Determine if there is a thread ready to execute AND all ISRs
|
||||
are complete. */
|
||||
if ((_tx_thread_execute_ptr != TX_NULL) && (_tx_thread_system_state == 0))
|
||||
{
|
||||
|
||||
/* Get out of this loop and schedule the thread! */
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Leave the critical section. */
|
||||
_tx_win32_critical_section_release(&_tx_win32_critical_section);
|
||||
|
||||
/* Now sleep so we don't block forever. */
|
||||
Sleep(2);
|
||||
}
|
||||
}
|
||||
|
||||
/* Yes! We have a thread to execute. Note that the critical section is already
|
||||
active from the scheduling loop above. */
|
||||
|
||||
/* Setup the current thread pointer. */
|
||||
_tx_thread_current_ptr = _tx_thread_execute_ptr;
|
||||
|
||||
/* Increment the run count for this thread. */
|
||||
_tx_thread_current_ptr -> tx_thread_run_count++;
|
||||
|
||||
/* Setup time-slice, if present. */
|
||||
_tx_timer_time_slice = _tx_thread_current_ptr -> tx_thread_time_slice;
|
||||
|
||||
/* Determine how the thread was suspended. */
|
||||
if (_tx_thread_current_ptr -> tx_thread_win32_suspension_type)
|
||||
{
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SCHEDULE-resume_thread", __FILE__, __LINE__);
|
||||
|
||||
/* Pseudo interrupt suspension. The thread is not waiting on
|
||||
its run semaphore. */
|
||||
ResumeThread(_tx_thread_current_ptr -> tx_thread_win32_thread_handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SCHEDULE-release_sem", __FILE__, __LINE__);
|
||||
|
||||
/* Let the thread run again by releasing its run semaphore. */
|
||||
ReleaseSemaphore(_tx_thread_current_ptr -> tx_thread_win32_thread_run_semaphore, 1, NULL);
|
||||
}
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SCHEDULE-self_suspend_sem", __FILE__, __LINE__);
|
||||
|
||||
/* Exit Win32 critical section. */
|
||||
_tx_win32_critical_section_release(&_tx_win32_critical_section);
|
||||
|
||||
/* Now suspend the main thread so the application thread can run. */
|
||||
WaitForSingleObject(_tx_win32_scheduler_semaphore, INFINITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Define the ThreadX Win32 critical section get, release, and release all functions. */
|
||||
|
||||
void _tx_win32_critical_section_obtain(TX_WIN32_CRITICAL_SECTION *critical_section)
|
||||
{
|
||||
|
||||
TX_THREAD *thread_ptr;
|
||||
|
||||
|
||||
/* Is the protection owned? */
|
||||
if (critical_section -> tx_win32_critical_section_owner == GetCurrentThreadId())
|
||||
{
|
||||
|
||||
/* Simply increment the nested counter. */
|
||||
critical_section -> tx_win32_critical_section_nested_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Pickup the current thread pointer. */
|
||||
thread_ptr = _tx_thread_current_ptr;
|
||||
|
||||
/* Get the Win32 critical section. */
|
||||
while (WaitForSingleObject(critical_section -> tx_win32_critical_section_mutex_handle, 3) != WAIT_OBJECT_0)
|
||||
{
|
||||
}
|
||||
|
||||
/* At this point we have the mutex. */
|
||||
|
||||
/* Increment the nesting counter. */
|
||||
critical_section -> tx_win32_critical_section_nested_count = 1;
|
||||
|
||||
/* Remember the owner. */
|
||||
critical_section -> tx_win32_critical_section_owner = GetCurrentThreadId();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void _tx_win32_critical_section_release(TX_WIN32_CRITICAL_SECTION *critical_section)
|
||||
{
|
||||
|
||||
|
||||
/* Ensure the caller is the mutex owner. */
|
||||
if (critical_section -> tx_win32_critical_section_owner == GetCurrentThreadId())
|
||||
{
|
||||
|
||||
/* Determine if there is protection. */
|
||||
if (critical_section -> tx_win32_critical_section_nested_count)
|
||||
{
|
||||
|
||||
/* Decrement the nesting counter. */
|
||||
critical_section -> tx_win32_critical_section_nested_count--;
|
||||
|
||||
/* Determine if the critical section is now being released. */
|
||||
if (critical_section -> tx_win32_critical_section_nested_count == 0)
|
||||
{
|
||||
|
||||
/* Yes, it is being released clear the owner. */
|
||||
critical_section -> tx_win32_critical_section_owner = 0;
|
||||
|
||||
/* Finally, release the mutex. */
|
||||
if (ReleaseMutex(critical_section -> tx_win32_critical_section_mutex_handle) != TX_TRUE)
|
||||
{
|
||||
|
||||
/* Increment the system error counter. */
|
||||
_tx_win32_system_error++;
|
||||
}
|
||||
|
||||
/* Just in case, make sure there the mutex is not owned. */
|
||||
while (ReleaseMutex(critical_section -> tx_win32_critical_section_mutex_handle) == TX_TRUE)
|
||||
{
|
||||
|
||||
/* Increment the system error counter. */
|
||||
_tx_win32_system_error++;
|
||||
}
|
||||
|
||||
/* Sleep for 0, just to relinquish to other ready threads. */
|
||||
Sleep(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Increment the system error counter. */
|
||||
_tx_win32_system_error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void _tx_win32_critical_section_release_all(TX_WIN32_CRITICAL_SECTION *critical_section)
|
||||
{
|
||||
|
||||
/* Ensure the caller is the mutex owner. */
|
||||
if (critical_section -> tx_win32_critical_section_owner == GetCurrentThreadId())
|
||||
{
|
||||
|
||||
/* Determine if there is protection. */
|
||||
if (critical_section -> tx_win32_critical_section_nested_count)
|
||||
{
|
||||
|
||||
/* Clear the nesting counter. */
|
||||
critical_section -> tx_win32_critical_section_nested_count = 0;
|
||||
|
||||
/* Yes, it is being release clear the owner. */
|
||||
critical_section -> tx_win32_critical_section_owner = 0;
|
||||
|
||||
/* Finally, release the mutex. */
|
||||
if (ReleaseMutex(critical_section -> tx_win32_critical_section_mutex_handle) != TX_TRUE)
|
||||
{
|
||||
|
||||
/* Increment the system error counter. */
|
||||
_tx_win32_system_error++;
|
||||
}
|
||||
|
||||
/* Just in case, make sure there the mutex is not owned. */
|
||||
while (ReleaseMutex(critical_section -> tx_win32_critical_section_mutex_handle) == TX_TRUE)
|
||||
{
|
||||
|
||||
/* Increment the system error counter. */
|
||||
_tx_win32_system_error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Increment the system error counter. */
|
||||
_tx_win32_system_error++;
|
||||
}
|
||||
}
|
||||
|
||||
157
ports/win32/vs_2019/src/tx_thread_stack_build.c
Normal file
157
ports/win32/vs_2019/src/tx_thread_stack_build.c
Normal file
@@ -0,0 +1,157 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/* Prototype for new thread entry function. */
|
||||
|
||||
DWORD WINAPI _tx_win32_thread_entry(LPVOID p);
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_stack_build Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function builds a stack frame on the supplied thread's stack. */
|
||||
/* The stack frame results in a fake interrupt return to the supplied */
|
||||
/* function pointer. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* thread_ptr Pointer to thread control blk */
|
||||
/* function_ptr Pointer to return function */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* CreateThread Win32 create thread */
|
||||
/* ResumeThread Win32 resume thread */
|
||||
/* SetThreadPriority Win32 set thread priority */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* _tx_thread_create Create thread service */
|
||||
/* _tx_thread_reset Reset thread service */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
|
||||
{
|
||||
|
||||
/* Create a Win32 thread for the application thread. */
|
||||
thread_ptr -> tx_thread_win32_thread_handle =
|
||||
CreateThread(NULL, 0, _tx_win32_thread_entry, (LPVOID) thread_ptr, CREATE_SUSPENDED,
|
||||
&(thread_ptr -> tx_thread_win32_thread_id));
|
||||
|
||||
/* Check for a good thread create. */
|
||||
if (!thread_ptr -> tx_thread_win32_thread_handle)
|
||||
{
|
||||
|
||||
/* Display an error message. */
|
||||
printf("ThreadX Win32 error creating thread!\n");
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, we have a good thread create. Now set the priority to
|
||||
a lower level. */
|
||||
SetThreadPriority(thread_ptr -> tx_thread_win32_thread_handle, THREAD_PRIORITY_LOWEST);
|
||||
|
||||
/* Create the run semaphore for the thread. This will allow the scheduler
|
||||
control over when the thread actually runs. */
|
||||
thread_ptr -> tx_thread_win32_thread_run_semaphore = CreateSemaphore(NULL, 0, 1, NULL);
|
||||
|
||||
/* Determine if the run semaphore was created successfully. */
|
||||
if (!thread_ptr -> tx_thread_win32_thread_run_semaphore)
|
||||
{
|
||||
|
||||
/* Display an error message. */
|
||||
printf("ThreadX Win32 error creating thread running semaphore!\n");
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup the thread suspension type to solicited thread suspension.
|
||||
Pseudo interrupt handlers will suspend with this field set to 1. */
|
||||
thread_ptr -> tx_thread_win32_suspension_type = 0;
|
||||
|
||||
/* Clear the disabled count that will keep track of the
|
||||
tx_interrupt_control nesting. */
|
||||
thread_ptr -> tx_thread_win32_int_disabled_flag = 0;
|
||||
|
||||
/* Setup a fake thread stack pointer. */
|
||||
thread_ptr -> tx_thread_stack_ptr = (VOID *) (((CHAR *) thread_ptr -> tx_thread_stack_end) - 8);
|
||||
|
||||
/* Clear the first word of the stack. */
|
||||
*(((ULONG *) thread_ptr -> tx_thread_stack_ptr) - 1) = 0;
|
||||
|
||||
/* Make the thread initially ready so it will run to the initial wait on
|
||||
its run semaphore. */
|
||||
ResumeThread(thread_ptr -> tx_thread_win32_thread_handle);
|
||||
}
|
||||
|
||||
|
||||
DWORD WINAPI _tx_win32_thread_entry(LPVOID ptr)
|
||||
{
|
||||
|
||||
TX_THREAD *thread_ptr;
|
||||
|
||||
/* Pickup the current thread pointer. */
|
||||
thread_ptr = (TX_THREAD *) ptr;
|
||||
|
||||
/* Now suspend the thread initially. If the thread has already
|
||||
been scheduled, this will return immediately. */
|
||||
WaitForSingleObject(thread_ptr -> tx_thread_win32_thread_run_semaphore, INFINITE);
|
||||
|
||||
/* Call ThreadX thread entry point. */
|
||||
_tx_thread_shell_entry();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
212
ports/win32/vs_2019/src/tx_thread_system_return.c
Normal file
212
ports/win32/vs_2019/src/tx_thread_system_return.c
Normal file
@@ -0,0 +1,212 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/** Thread */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_thread.h"
|
||||
#include "tx_timer.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_thread_system_return Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function is target processor specific. It is used to transfer */
|
||||
/* control from a thread back to the system. Only a minimal context */
|
||||
/* is saved since the compiler assumes temp registers are going to get */
|
||||
/* slicked by a function call anyway. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_win32_critical_section_obtain Obtain critical section */
|
||||
/* _tx_win32_critical_section_release Release critical section */
|
||||
/* _tx_win32_critical_section_release_all */
|
||||
/* Release critical section */
|
||||
/* ExitThread Win32 thread exit */
|
||||
/* GetCurrentThread Win32 get current thread */
|
||||
/* GetCurrentThreadId Win32 get current thread ID */
|
||||
/* GetThreadPriority Win32 get thread priority */
|
||||
/* ReleaseSemaphore Win32 release semaphore */
|
||||
/* WaitForSingleObject Win32 wait on semaphore */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* ThreadX components */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_thread_system_return(VOID)
|
||||
{
|
||||
|
||||
TX_THREAD *temp_thread_ptr;
|
||||
HANDLE temp_run_semaphore;
|
||||
UINT temp_thread_state;
|
||||
HANDLE threadhandle;
|
||||
int threadpriority;
|
||||
DWORD threadid;
|
||||
|
||||
|
||||
/* Enter Win32 critical section. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
/* Pickup the handle of the current thread. */
|
||||
threadhandle = GetCurrentThread();
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SYSTEM_RETURN", __FILE__, __LINE__);
|
||||
|
||||
/* First, determine if the thread was terminated. */
|
||||
|
||||
/* Pickup the priority of the current thread. */
|
||||
threadpriority = GetThreadPriority(threadhandle);
|
||||
|
||||
/* Pickup the ID of the current thread. */
|
||||
threadid = GetCurrentThreadId();
|
||||
|
||||
/* Pickup the current thread pointer. */
|
||||
temp_thread_ptr = _tx_thread_current_ptr;
|
||||
|
||||
/* Determine if this is a thread (THREAD_PRIORITY_LOWEST) and it does not
|
||||
match the current thread pointer. */
|
||||
if ((threadpriority == THREAD_PRIORITY_LOWEST) &&
|
||||
((!temp_thread_ptr) || (temp_thread_ptr -> tx_thread_win32_thread_id != threadid)))
|
||||
{
|
||||
|
||||
/* This indicates the Win32 thread was actually terminated by ThreadX and is only
|
||||
being allowed to run in order to cleanup its resources. */
|
||||
|
||||
/* Release critical section. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
|
||||
/* Exit thread. */
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
/* Determine if the time-slice is active. */
|
||||
if (_tx_timer_time_slice)
|
||||
{
|
||||
|
||||
/* Preserve current remaining time-slice for the thread and clear the current time-slice. */
|
||||
temp_thread_ptr -> tx_thread_time_slice = _tx_timer_time_slice;
|
||||
_tx_timer_time_slice = 0;
|
||||
}
|
||||
|
||||
/* Save the run semaphore into a temporary variable as well. */
|
||||
temp_run_semaphore = temp_thread_ptr -> tx_thread_win32_thread_run_semaphore;
|
||||
|
||||
/* Pickup the current thread state. */
|
||||
temp_thread_state = temp_thread_ptr -> tx_thread_state;
|
||||
|
||||
/* Setup the suspension type for this thread. */
|
||||
temp_thread_ptr -> tx_thread_win32_suspension_type = 0;
|
||||
|
||||
/* Set the current thread pointer to NULL. */
|
||||
_tx_thread_current_ptr = TX_NULL;
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SYSTEM_RETURN-release_sem", __FILE__, __LINE__);
|
||||
|
||||
/* Release the semaphore that the main scheduling thread is waiting
|
||||
on. Note that the main scheduling algorithm will take care of
|
||||
setting the current thread pointer to NULL. */
|
||||
ReleaseSemaphore(_tx_win32_scheduler_semaphore, 1, NULL);
|
||||
|
||||
/* Leave Win32 critical section. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
|
||||
/* Determine if the thread was self-terminating. */
|
||||
if (temp_thread_state == TX_TERMINATED)
|
||||
{
|
||||
|
||||
/* Exit the thread instead of waiting on the semaphore! */
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
/* Wait on the run semaphore for this thread. This won't get set again
|
||||
until the thread is scheduled. */
|
||||
WaitForSingleObject(temp_run_semaphore, INFINITE);
|
||||
|
||||
/* Enter Win32 critical section. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SYSTEM_RETURN-wake_up", __FILE__, __LINE__);
|
||||
|
||||
/* Determine if the thread was terminated. */
|
||||
|
||||
/* Pickup the current thread pointer. */
|
||||
temp_thread_ptr = _tx_thread_current_ptr;
|
||||
|
||||
/* Determine if this is a thread (THREAD_PRIORITY_LOWEST) and it does not
|
||||
match the current thread pointer. */
|
||||
if ((threadpriority == THREAD_PRIORITY_LOWEST) &&
|
||||
((!temp_thread_ptr) || (temp_thread_ptr -> tx_thread_win32_thread_id != threadid)))
|
||||
{
|
||||
|
||||
/* Leave Win32 critical section. */
|
||||
_tx_win32_critical_section_release_all(&_tx_win32_critical_section);
|
||||
|
||||
/* This indicates the Win32 thread was actually terminated by ThreadX and is only
|
||||
being allowed to run in order to cleanup its resources. */
|
||||
ExitThread(0);
|
||||
}
|
||||
|
||||
/* Now determine if the application thread last had interrupts disabled. */
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("SYSTEM_RETURN-finish", __FILE__, __LINE__);
|
||||
|
||||
/* Determine if this thread had interrupts disabled. */
|
||||
if (!_tx_thread_current_ptr -> tx_thread_win32_int_disabled_flag)
|
||||
{
|
||||
|
||||
/* Leave Win32 critical section. */
|
||||
_tx_win32_critical_section_release(&_tx_win32_critical_section);
|
||||
}
|
||||
}
|
||||
|
||||
153
ports/win32/vs_2019/src/tx_timer_interrupt.c
Normal file
153
ports/win32/vs_2019/src/tx_timer_interrupt.c
Normal file
@@ -0,0 +1,153 @@
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
#define TX_SOURCE_CODE
|
||||
|
||||
|
||||
/* Include necessary system files. */
|
||||
|
||||
#include "tx_api.h"
|
||||
#include "tx_timer.h"
|
||||
#include "tx_thread.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* FUNCTION RELEASE */
|
||||
/* */
|
||||
/* _tx_timer_interrupt Win32/Visual */
|
||||
/* 6.0.1 */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
/* William E. Lamie, Microsoft Corporation */
|
||||
/* */
|
||||
/* DESCRIPTION */
|
||||
/* */
|
||||
/* This function processes the hardware timer interrupt. This */
|
||||
/* processing includes incrementing the system clock and checking for */
|
||||
/* time slice and/or timer expiration. If either is found, the */
|
||||
/* interrupt context save/restore functions are called along with the */
|
||||
/* expiration functions. */
|
||||
/* */
|
||||
/* INPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* OUTPUT */
|
||||
/* */
|
||||
/* None */
|
||||
/* */
|
||||
/* CALLS */
|
||||
/* */
|
||||
/* _tx_thread_time_slice Time slice interrupted thread */
|
||||
/* _tx_timer_expiration_process Timer expiration processing */
|
||||
/* _tx_win32_critical_section_obtain Obtain critical section */
|
||||
/* _tx_win32_critical_section_release Release critical section */
|
||||
/* */
|
||||
/* CALLED BY */
|
||||
/* */
|
||||
/* interrupt vector */
|
||||
/* */
|
||||
/* RELEASE HISTORY */
|
||||
/* */
|
||||
/* DATE NAME DESCRIPTION */
|
||||
/* */
|
||||
/* 06-30-2020 William E. Lamie Initial Version 6.0.1 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
VOID _tx_timer_interrupt(VOID)
|
||||
{
|
||||
|
||||
|
||||
/* Enter critical section to ensure other threads are not playing with
|
||||
the core ThreadX data structures. */
|
||||
_tx_win32_critical_section_obtain(&_tx_win32_critical_section);
|
||||
|
||||
/* Debug entry. */
|
||||
_tx_win32_debug_entry_insert("TIMER INTERRUPT", __FILE__, __LINE__);
|
||||
|
||||
/* Increment the system clock. */
|
||||
_tx_timer_system_clock++;
|
||||
|
||||
/* Test for time-slice expiration. */
|
||||
if (_tx_timer_time_slice)
|
||||
{
|
||||
|
||||
/* Decrement the time_slice. */
|
||||
_tx_timer_time_slice--;
|
||||
|
||||
/* Check for expiration. */
|
||||
if (_tx_timer_time_slice == 0)
|
||||
{
|
||||
|
||||
/* Set the time-slice expired flag. */
|
||||
_tx_timer_expired_time_slice = TX_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Test for timer expiration. */
|
||||
if (*_tx_timer_current_ptr)
|
||||
{
|
||||
|
||||
/* Set expiration flag. */
|
||||
_tx_timer_expired = TX_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* No timer expired, increment the timer pointer. */
|
||||
_tx_timer_current_ptr++;
|
||||
|
||||
/* Check for wrap-around. */
|
||||
if (_tx_timer_current_ptr == _tx_timer_list_end)
|
||||
{
|
||||
|
||||
/* Wrap to beginning of list. */
|
||||
_tx_timer_current_ptr = _tx_timer_list_start;
|
||||
}
|
||||
}
|
||||
|
||||
/* See if anything has expired. */
|
||||
if ((_tx_timer_expired_time_slice) || (_tx_timer_expired))
|
||||
{
|
||||
|
||||
/* Did a timer expire? */
|
||||
if (_tx_timer_expired)
|
||||
{
|
||||
|
||||
/* Process timer expiration. */
|
||||
_tx_timer_expiration_process();
|
||||
}
|
||||
|
||||
/* Did time slice expire? */
|
||||
if (_tx_timer_expired_time_slice)
|
||||
{
|
||||
|
||||
/* Time slice interrupted thread. */
|
||||
_tx_thread_time_slice();
|
||||
}
|
||||
}
|
||||
|
||||
/* Exit Win32 critical section. */
|
||||
_tx_win32_critical_section_release(&_tx_win32_critical_section);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user