forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIN32-MSVC Demo] Define TickType_t width based on the target platfor…
…m(32bit/64bit). (FreeRTOS#1201) * [WIN32-MSVC Demo] Add tick type width definition based on the target platform.(32bit/64bit) 32bit TickType_t is used on Win32 target. 64bit TickType_t is used on x64 target. Reason of change: Before this change, 32bit TickType_t is always used in MSVC demo. It is inefficient for 64bit target. In addition, compiler reported warnings for the cast operation between TickType_t and (void *) pointer if the target is x64 because of different width. 64bit TickType_t should be used instead of 32bit if target is 64bit. * [WIN32-MSVC Demo] Change type of some variables from uint32_t to UBaseType_t. Reason of change: These variables are cast to/from pointer type in existing codes. x64 compiler reports warnings for the cast operations between uint32_t and pointer type. UBaseType_t solves those warnings because it has same width as pointer type on both of Win32 platform and x64 platform. * [WIN32-MSVC Demo]Correct prefix of variables and indent to follow coding style guide. * [WIN32-MSVC Demo]Correct type of the argument in vApplicationGetIdleTaskMemory() prototype declaration. It is corrected to match original declaration described in task.h. * [WIN32-MSVC] Add cast operation to solve compiler warnings on x64 platform. Before this change, compiler claimed that the cast operation to wider type should be applied before other arithmetic operations because of overflow risk. There is no overflow risk here but it is modified to solve compiler warnings.
- Loading branch information
Showing
3 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters