X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=clients%2Fms_setting.h;h=7d31532c8b5ea7a8590de1402bcc82112724f711;hb=e42302e08fa4d04cb21eaf7493f5f92b11169c03;hp=d08998c61ed3ded374744097a8e2811df07568e7;hpb=a7a011c2ea4a63368b3a96a332da00820ed402cb;p=awesomized%2Flibmemcached diff --git a/clients/ms_setting.h b/clients/ms_setting.h index d08998c6..7d31532c 100644 --- a/clients/ms_setting.h +++ b/clients/ms_setting.h @@ -53,8 +53,8 @@ typedef struct mcd_sever int srv_port; /* server port */ /* for calculating how long the server disconnects */ - int disconn_cnt; /* number of disconnections count */ - int reconn_cnt; /* number of reconnections count */ + volatile uint32_t disconn_cnt; /* number of disconnections count */ + volatile uint32_t reconn_cnt; /* number of reconnections count */ struct timeval disconn_time; /* start time of disconnection */ struct timeval reconn_time; /* end time of reconnection */ } ms_mcd_server_t; @@ -112,7 +112,7 @@ typedef struct setting { int ncpu; /* cpu count of this system */ int nthreads; /* total thread count, must equal or less than cpu cores */ - int nconns; /* total conn count, must multiply by total thread count */ + int nconns; /* total conn count, must multiply by total thread count */ int64_t exec_num; /* total execute number */ int run_time; /* total run time */ @@ -156,9 +156,9 @@ typedef struct setting bool binary_prot; /* whether it use binary protocol */ int expected_tps; /* expected throughput */ int rep_write_srv; /* which servers are used to do replication writing */ -} ms_setting_t; +} ms_setting_st; -extern ms_setting_t ms_setting; +extern ms_setting_st ms_setting; /* previous part of initialization of setting structure */ void ms_setting_init_pre(void);