X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fms_memslap.h;h=1c1b29ebe7f38163ab84f745aad80710bdb6bc35;hb=9b13e23dc5a1c11b93cefc9f188cf459af68bede;hp=0b9cc29e2cea1d65a8ebd32e4ab845429c62a305;hpb=7fafbd3dbd318577553476edf6436926aff9014c;p=awesomized%2Flibmemcached diff --git a/clients/ms_memslap.h b/clients/ms_memslap.h index 0b9cc29e..1c1b29eb 100644 --- a/clients/ms_memslap.h +++ b/clients/ms_memslap.h @@ -19,7 +19,9 @@ #include #include #include -#include +#if !defined(__cplusplus) +# include +#endif #include #include "ms_stats.h" @@ -53,7 +55,7 @@ typedef enum OPT_BINARY_PROTOCOL= 'B', OPT_OVERWRITE= 'o', OPT_TPS= 'P', - OPT_REP_WRITE_SRV= 'p', + OPT_REP_WRITE_SRV= 'p' } ms_options_t; /* global statistic of response time */ @@ -69,7 +71,7 @@ typedef struct statistic /* global status statistic structure */ typedef struct stats { - volatile int32_t active_conns; /* active connections */ + volatile uint32_t active_conns; /* active connections */ size_t bytes_read; /* read bytes */ size_t bytes_written; /* written bytes */ size_t obj_bytes; /* object bytes */ @@ -90,7 +92,7 @@ typedef struct stats /* lock adapter */ typedef struct sync_lock { - int count; + uint32_t count; pthread_mutex_t lock; pthread_cond_t cond; } ms_sync_lock_t; @@ -100,6 +102,7 @@ typedef struct global { /* synchronize lock */ ms_sync_lock_t init_lock; + ms_sync_lock_t warmup_lock; ms_sync_lock_t run_lock; /* mutex for outputing error log synchronously when memslap crashes */