@@ -121,6 +121,7 @@ typedef struct socket_set
121
121
#define THREAD_T HANDLE
122
122
#define THREAD_FUNC_RETURN_TYPE unsigned
123
123
#define THREAD_FUNC_RETURN return 0
124
+ #define THREAD_FUNC_CC __stdcall
124
125
#define THREAD_CREATE (handle , function , arg ) \
125
126
((*(handle) = (HANDLE) _beginthreadex(NULL, 0, (function), (arg), 0, NULL)) == 0 ? errno : 0)
126
127
#define THREAD_JOIN (handle ) \
@@ -139,6 +140,7 @@ typedef struct socket_set
139
140
#define THREAD_T pthread_t
140
141
#define THREAD_FUNC_RETURN_TYPE void *
141
142
#define THREAD_FUNC_RETURN return NULL
143
+ #define THREAD_FUNC_CC
142
144
#define THREAD_CREATE (handle , function , arg ) \
143
145
pthread_create((handle), NULL, (function), (arg))
144
146
#define THREAD_JOIN (handle ) \
@@ -153,6 +155,7 @@ typedef struct socket_set
153
155
#define THREAD_T void *
154
156
#define THREAD_FUNC_RETURN_TYPE void *
155
157
#define THREAD_FUNC_RETURN return NULL
158
+ #define THREAD_FUNC_CC
156
159
#define THREAD_BARRIER_T int
157
160
#define THREAD_BARRIER_INIT (barrier , n ) (*(barrier) = 0)
158
161
#define THREAD_BARRIER_WAIT (barrier )
@@ -639,7 +642,7 @@ static void doLog(TState *thread, CState *st,
639
642
static void processXactStats (TState * thread , CState * st , pg_time_usec_t * now ,
640
643
bool skipped , StatsData * agg );
641
644
static void addScript (ParsedScript script );
642
- static THREAD_FUNC_RETURN_TYPE threadRun (void * arg );
645
+ static THREAD_FUNC_RETURN_TYPE THREAD_FUNC_CC threadRun (void * arg );
643
646
static void finishCon (CState * st );
644
647
static void setalarm (int seconds );
645
648
static socket_set * alloc_socket_set (int count );
@@ -3565,10 +3568,12 @@ doLog(TState *thread, CState *st,
3565
3568
{
3566
3569
/* no, print raw transactions */
3567
3570
if (skipped )
3568
- fprintf (logfile , "%d " INT64_FORMAT " skipped %d %ld %ld" ,
3571
+ fprintf (logfile , "%d " INT64_FORMAT " skipped %d " INT64_FORMAT " "
3572
+ INT64_FORMAT ,
3569
3573
st -> id , st -> cnt , st -> use_file , now / 1000000 , now % 1000000 );
3570
3574
else
3571
- fprintf (logfile , "%d " INT64_FORMAT " %.0f %d %ld %ld" ,
3575
+ fprintf (logfile , "%d " INT64_FORMAT " %.0f %d " INT64_FORMAT " "
3576
+ INT64_FORMAT ,
3572
3577
st -> id , st -> cnt , latency , st -> use_file ,
3573
3578
now / 1000000 , now % 1000000 );
3574
3579
if (throttle_delay )
@@ -6222,7 +6227,7 @@ main(int argc, char **argv)
6222
6227
return exit_code ;
6223
6228
}
6224
6229
6225
- static THREAD_FUNC_RETURN_TYPE
6230
+ static THREAD_FUNC_RETURN_TYPE THREAD_FUNC_CC
6226
6231
threadRun (void * arg )
6227
6232
{
6228
6233
TState * thread = (TState * ) arg ;
0 commit comments