Skip to content

Conversation

@leegeth
Copy link
Contributor

@leegeth leegeth commented Jan 10, 2020

Root cause: Sleep() in Windows is not guaranteed to be realtime. Usage of Sleep()
was causing ticks in Windows port to be incorrect.
Solution: Use Waitable Timer in Windows for more accuracy.

Root cause: Sleep() in Windows is not guaranteed to be realtime. Usage of Sleep()
was causing ticks in Windows port to be incorrect.
Solution: Use Waitable Timer in Windows for more accuracy.
@RichardBarry
Copy link
Contributor

This is a great change - although currently the change in timing makes some of our self monitoring tests fail as they were tuned to using the current method. We will need to fix up the test timing at the same time as accepting this PR.


/* Set the Waitable Timer. The timer is set to run periodically at every
xWaitTimeBetweenTicks milliseconds. */
configASSERT( SetWaitableTimer( hTimer, &liDueTime, xWaitTimeBetweenTicks, NULL, NULL, 0 ) );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-pick: better to separate to two lines for debugging purpose.

Copy link

@qiutongs qiutongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me.

@leegeth leegeth requested a review from cobusve July 13, 2020 21:13
@cobusve
Copy link
Contributor

cobusve commented Aug 27, 2020

This one has become stale since the Kernel is now a submodule. I recreated it as FreeRTOS/FreeRTOS-Kernel#142

@cobusve cobusve closed this Aug 27, 2020
moninom1 pushed a commit that referenced this pull request Sep 14, 2022
alfred2g pushed a commit to alfred2g/FreeRTOS that referenced this pull request Feb 22, 2023
* Remove multiple_priorities_no_timeslice_covg, single_priority_no_timeslice_covg and single_priority_timeslice_thread test folders and move the covg utest.c to the folder with same FreeRTOSConfig.h
* Add configUSE_TICKLESS_IDLE config in single_priority_no_timeslice test group
* Add configUSE_MINIMAL_IDLE_HOOK config in single_priority_timeslice test group
alfred2g pushed a commit to alfred2g/FreeRTOS that referenced this pull request Feb 22, 2023
* Remove multiple_priorities_no_timeslice_covg, single_priority_no_timeslice_covg and single_priority_timeslice_thread test folders and move the covg utest.c to the folder with same FreeRTOSConfig.h
* Add configUSE_TICKLESS_IDLE config in single_priority_no_timeslice test group
* Add configUSE_MINIMAL_IDLE_HOOK config in single_priority_timeslice test group
urutva pushed a commit to urutva/FreeRTOS that referenced this pull request Aug 29, 2023
* Fix Pico compile warning -- port layer

* Warning resolved for volatile discard task.c (FreeRTOS#5)

---------

Co-authored-by: Pranjal Chanda <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants