mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
WIN32 simulator port: Allow the configTICK_RATE_HZ to be increased without making the sleep time in the simulated timer peripheral too small.
This commit is contained in:
parent
412c2cc9a7
commit
58a700b8f7
|
@ -129,6 +129,8 @@ extern void *pxCurrentTCB;
|
|||
|
||||
static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter )
|
||||
{
|
||||
portTickType xMinimumWindowsBlockTime = ( portTickType ) 20;
|
||||
|
||||
/* Just to prevent compiler warnings. */
|
||||
( void ) lpParameter;
|
||||
|
||||
|
@ -140,7 +142,14 @@ static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter )
|
|||
time, not the time that Sleep() is called. It is done this way to
|
||||
prevent overruns in this very non real time simulated/emulated
|
||||
environment. */
|
||||
if( portTICK_RATE_MS < xMinimumWindowsBlockTime )
|
||||
{
|
||||
Sleep( xMinimumWindowsBlockTime );
|
||||
}
|
||||
else
|
||||
{
|
||||
Sleep( portTICK_RATE_MS );
|
||||
}
|
||||
|
||||
WaitForSingleObject( pvInterruptEventMutex, INFINITE );
|
||||
|
||||
|
|
Loading…
Reference in a new issue