@@ -544,8 +544,8 @@ static LONG s_wrappedWriteThreadCount;
544
544
545
545
static const LONG MAX_MESSAGE_COUNT = 64 * 1024 * 1024 ;
546
546
static StressThreadAndMsg* s_threadMsgBuf;
547
- static volatile LONG s_msgCount = 0 ;
548
- static volatile LONG s_totalMsgCount = 0 ;
547
+ static volatile LONGLONG s_msgCount = 0 ;
548
+ static volatile LONGLONG s_totalMsgCount = 0 ;
549
549
static double s_timeFilterStart = 0 ;
550
550
static double s_timeFilterEnd = 0 ;
551
551
static wchar_t * s_outputFileName = nullptr ;
@@ -988,7 +988,7 @@ bool ParseOptions(int argc, wchar_t* argv[])
988
988
989
989
static void IncludeMessage (uint64_t threadId, StressMsg* msg)
990
990
{
991
- LONG msgCount = _InterlockedIncrement (&s_msgCount) - 1 ;
991
+ LONGLONG msgCount = _InterlockedIncrement64 (&s_msgCount) - 1 ;
992
992
if (msgCount < MAX_MESSAGE_COUNT)
993
993
{
994
994
s_threadMsgBuf[msgCount].threadId = threadId;
@@ -1133,7 +1133,7 @@ DWORD WINAPI ProcessStresslogWorker(LPVOID)
1133
1133
s_threadStressLogDesc[threadStressLogIndex].workFinished = 1 ;
1134
1134
}
1135
1135
1136
- InterlockedAdd (&s_totalMsgCount, totalMsgCount);
1136
+ InterlockedAdd64 (&s_totalMsgCount, totalMsgCount);
1137
1137
InterlockedAdd (&s_wrappedWriteThreadCount, wrappedWriteThreadCount);
1138
1138
1139
1139
return 0 ;
@@ -1151,7 +1151,7 @@ static double FindLatestTime(StressLog::StressLogHeader* hdr)
1151
1151
return latestTime;
1152
1152
}
1153
1153
1154
- static void PrintFriendlyNumber (int n)
1154
+ static void PrintFriendlyNumber (LONGLONG n)
1155
1155
{
1156
1156
if (n < 1000 )
1157
1157
printf (" %d" , n);
0 commit comments