Skip to content

Commit cddeaf1

Browse files
committed
64bit TickType_t is supported on Windows port.(MSVC and MinGW)
Especially it is introduced for 64bit compiler.(x64 platform on MSVC and MinGW-w64)
1 parent 4732b96 commit cddeaf1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

portable/MSVC-MingW/portmacro.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,18 @@ typedef portSTACK_TYPE StackType_t;
7272
typedef uint32_t TickType_t;
7373
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
7474

75-
/* 32/64-bit tick type on a 32/64-bit architecture, so reads of the tick
75+
/* 32-bit tick type on a 32/64-bit architecture, so reads of the tick
7676
* count do not need to be guarded with a critical section. */
7777
#define portTICK_TYPE_IS_ATOMIC 1
78+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS )
79+
typedef uint64_t TickType_t;
80+
#define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffULL
81+
82+
#if defined( __x86_64__ ) || defined( _M_X64 )
83+
/* 64-bit tick type on a 64-bit architecture, so reads of the tick
84+
* count do not need to be guarded with a critical section. */
85+
#define portTICK_TYPE_IS_ATOMIC 1
86+
#endif
7887
#else
7988
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
8089
#endif

0 commit comments

Comments
 (0)